0

I'm sending messages through service broker from 8 different servers to one target server(8 different services and queues on target). I noticed that in some queues some messages got stuck, when I showed these messages it turns out that they are broken (the sql LEN () command returns exactly 45056 characters or a multiple of this number eg 90112,135168,225280). Every day, each queue on the target server receives about 1 to 100 messages depending on the server, the number of characters in the XML message is in the range from about 52 000 to even 300 000 characters and randomly once in a while one of the messages gets stuck in the queue (to queue A_ I already sent 9,000 messages, 5 messages in it got stuck and for example to queue B_ I sent 1300 messages, of which 200 still remained in the queue). After re-sending, these messages pass without a problem. All 8 servers use the same XMl template to send messages and exactly the same logic and scripts, the difference is that each server is located in a different institution (different location) and each must have a VPN service enabled to send the message to the target server.

I need some advice on why random messages are cut off.

2
  • Weird! That's 44 Kb which is also weird. How I'd start troubleshooting is looking at the messages as they sit in the queue. It looks like you're already familiar with selecting from the queue, but you can do select cast(message_body as nvarchar(max)) from «your queue» with an appropriate filter that identifies one of the messages you're interested in.
    – Ben Thul
    May 23, 2019 at 17:19
  • I do not know if this may matter but sometimes the server is shutting down vpn but the system logic tries to send a message and this message goes to transmission_queue where it waits to restore the connection. Such messages can be created up to 100 and then the system sends 100 messages at a time ( I remind you that one message has from 52,000 to 300,000 characters) when the connection comes back, so maybe there is a problem here that it's too much for him.
    – Tomi
    May 24, 2019 at 8:43

0

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.