Stomp RPC subscription fails with invalid destination for temp-queue

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Stomp RPC subscription fails with invalid destination for temp-queue

Jeroen
This post has NOT been accepted by the mailing list yet.
Hi,

I'm trying to implement a RPC call using the NMS Stomp C# client library version 1.5.4.3215
Now I have problems subscribing to notifications on a temporary queue.

RabbitMQ prevents me from subscribing to a temp-queue.

=ERROR REPORT==== 23-Nov-2015::07:32:34 ===
STOMP error frame sent:
Message: "Invalid destination"
Detail: "'/temp-queue/ID:AAA-GSHA45-40117-635838642227176494-1:0:1' is not a valid destination for 'SUBSCRIBE'\n"
Server private detail: none"

This is according to the documentation:
https://www.rabbitmq.com/stomp.html#d.tqd

However when I look in the Stomp library documentation the code pattern as I adapted is:

using (var session = m_Connection.CreateSession())
{
    var tempQueue = session.CreateTemporaryQueue();
    var inputQueue = session.GetQueue(m_Config.InputQueueName);
 
    using (var consumer = session.CreateConsumer(tempQueue))
    using (var producer = session.CreateProducer())
    {
        m_Connection.Start();
        producer.DeliveryMode = MsgDeliveryMode.Persistent;
 
        var requestMessageBody = GetRequestMessageBody(commandType, thirdPartyId, content, m_Config);
        var requestMessage = session.CreateTextMessage(requestMessageBody);
 
        requestMessage.NMSReplyTo = tempQueue;
        requestMessage.NMSCorrelationID = Guid.NewGuid().ToString();
        requestMessage.NMSDeliveryMode = MsgDeliveryMode.Persistent;
 
        producer.Send(inputQueue, requestMessage);
 
        var response = consumer.Receive(TimeSpan.FromSeconds(ReceiveTimeout));
        var responseMessage = response as ITextMessage;
    }
}

So the consumer subscribes to the temp-queue. This is not allowed by RabbitMQ however.

SUBSCRIBE
id:ID\cAAA-GSHA45-40117-635838642227176494-1\c0\c1\c1
receipt:2
destination:/temp-queue/ID\cAAA-GSHA45-40117-635838642227176494-1\c0\c1
activemq.dispatchAsync:True
transformation:jms-xml
activemq.priority:0
activemq.maximumPendingMessageLimit:0
activemq.prefetchSize:1000
ack:client

.ERROR
message:Invalid destination
content-type:text/plain
version:1.0,1.1,1.2
content-length:103

'/temp-queue/ID:AAA-GSHA45-40117-635838642227176494-1:0:1' is not a valid destination for 'SUBSCRIBE'
.

What am I doing wrong? Is this a bug in the Stomp client?

Regards, Jeroen