|
|
|
SSC-Addicted
      
Group: General Forum Members
Last Login: Saturday, May 18, 2013 4:20 PM
Points: 479,
Visits: 406
|
|
Hi guys,
I created a queue as in the query below....but I am not able to see the messages in the queue...
CREATE MESSAGE TYPE MyMessage VALIDATION = WELL_FORMED_XML;
CREATE CONTRACT MyContract (MyMessage SENT BY ANY );
CREATE QUEUE MySendingQueue WITH STATUS=ON ,RETENTION=OFF;
CREATE QUEUE MyReceivingQueue WITH STATUS=ON ,RETENTION=OFF;
CREATE SERVICE MySendingService ON QUEUE MySendingQueue (MyContract);
CREATE SERVICE MyReceivingService ON QUEUE MyReceivingQueue (MyContract);
DECLARE @handle uniqueidentifier BEGIN DIALOG CONVERSATION @handle FROM SERVICE MySendingService TO SERVICE 'MyReceivingService' ON CONTRACT MyContract;
SEND ON CONVERSATION @handle MESSAGE TYPE MyMessage ('<message>hello world</message>')
END CONVERSATION @handle
SELECT * FROM dbo.MySendingQueue
|
|
|
|
|
SSCommitted
      
Group: General Forum Members
Last Login: Yesterday @ 8:52 AM
Points: 1,788,
Visits: 3,327
|
|
| If the message fails to be sent to the receiving service, you'll find it in sys.transmission_queue along with a error describing why it couldn't be sent.
|
|
|
|