message_body is null with one message RRS feed

  • Question

  • All,

    I'll be the first to admit that I'm not a Service Broker expert. On a single service broker instance I'm trying to create a "generic" message processing system that uses table-driven approach to route outbound and inbound messages through a single "action" stored procedure to multiple "catch" stored procedures for reactions to different XML payloads.

    Issue: upMyCatchProc uses a WAITFOR(receive top(1) @message = mesage_body FROM MyLocalQueue), TIMEOUT 5000;
    gets one message where @message has valid XML from the message_body, then immediately (before any other procedure code is executed) another message is triggered this time the message_body is null at which point procedure processing continues with NULL content.

    Turning RETENTION=ON on the QUEUE only reveals one message in the queue.
    The same behavior occurs whether there's one queue or two queues, multiple message types and/or multiple contracts.

    I've read about END DIALOG messages but I have not been able to get much information.

    Has anyone experienced this scenario and/or have any tests, remediations, or thoughts?



    Thursday, June 2, 2011 8:36 PM