Abdallah Abis
Abdallah Abis
CDCloudflare Developers
Created by Abdallah Abis on 6/4/2024 in #workers-help
How to calculate queue message size before sending it to queue the way CF does it?
Hey folks, Any idea of how Cloudflare calculates queue message size before sending it to queue, a worker of mine throws this: Queue send failed: message length of 165746 bytes exceeds limit of 128000 Because the messages I’m sending to queue can vary in size, I can’t batch the arrays I send to queue by a batchSize because then sometimes it exceeds the limit, what I need is to batch the array based on the size in bytes. I tried all the things ChatGPT suggested and it’s very different from what CF throws, my calculations usually log around 4000000 bytes while CF throws 165746
1 replies
CDCloudflare Developers
Created by Abdallah Abis on 7/25/2023 in #workers-help
Queue consumer tail log missing event.request
Hey there! I'm currently working on implementing the Tail Event worker with Cloudflare Queue and encountered an issue. It seems that the event.request is only available on the fetch handler, while the queue handler only provides the following information:
"event": {
"batchSize": 1,
"queue": "queue"
},
"event": {
"batchSize": 1,
"queue": "queue"
},
I really need the request information to enhance the structure of my logs on the tail event log for sending them to New Relic. The request contains essential details about the client and the use case of the worker. Is there a way to include this request information in the output of the consumer? Any assistance or suggestions on how to handle this situation would be highly appreciated. Thank you!
3 replies
CDCloudflare Developers
Created by Abdallah Abis on 7/7/2023 in #workers-help
Issue with Cloudflare TailEvent Worker Update
I'm encountering an issue with updating a Cloudflare TailEvent worker. Changes made to the worker don't take effect until I manually re-deploy the fetch worker that uses it. This means tailed workers continue to use the old version of the TailEvent worker, as if it never got updated. Could you please advise on how to ensure that changes to the TailEvent worker propagate automatically without requiring individual redeployments of tailed workers? Your assistance in resolving this matter would be greatly appreciated.
2 replies
CDCloudflare Developers
Created by Abdallah Abis on 7/6/2023 in #workers-help
Retrieving Fetch Worker Information from Tail Worker
Hey everyone! I have a question regarding my tail worker. It reads logs from other workers and pushes them to New Relic. I was wondering if there's a way for me to retrieve some specific information about the fetch worker that sends the logs to the tail worker. Here's what I need:
- Account name on where the worker lives.
- App name.
- Account ID and Zone ID.,
- Worker environment that was triggered/called.
- Account name on where the worker lives.
- App name.
- Account ID and Zone ID.,
- Worker environment that was triggered/called.
Any guidance on how to obtain this information would be greatly appreciated! I appreciate any help you can provide.
3 replies