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.
select
ing from the queue, but you can doselect cast(message_body as nvarchar(max)) from «your queue»
with an appropriate filter that identifies one of the messages you're interested in.