header data

19 views
Skip to first unread message

Phillip Neumann

unread,
Apr 23, 2010, 1:20:07 PM4/23/10
to amq...@googlegroups.com
Hello all,

I need to publish a message to an exchange with the following data in
the header: app_id, message_id, correlation_id, reply_to.

Is it possible to do it with amqp-js?

Thanks!

--
You received this message because you are subscribed to the Google Groups "amqp-js" group.
To post to this group, send email to amq...@googlegroups.com.
To unsubscribe from this group, send email to amqp-js+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/amqp-js?hl=en.

Phillip Neumann

unread,
Apr 23, 2010, 1:27:58 PM4/23/10
to amq...@googlegroups.com

El 23-04-2010, a las 13:20, Phillip Neumann escribió:

> Hello all,
>
> I need to publish a message to an exchange with the following data
> in the header: app_id, message_id, correlation_id, reply_to.
>
> Is it possible to do it with amqp-js?
>
> Thanks!


The idea, is to send in the reply_to header, the name of the queue the
amqp-js client is listening on.

Im creating the queue with var q = MQ.queue("auto", {autoDelete:
true}); so the name is assigned by the server.

If i do q.name, then the name is "auto".

How do i obtain the name of the queue that the server has created?

Thanks in advance!!

dan.simpson

unread,
Apr 23, 2010, 2:08:14 PM4/23/10
to amqp-js
Assuming I understand the problem: there is currently no way to supply
header data.

It is possible to supply that information in the payload though.

However, you need access to the actual queue name... which was not
accessible via the swf. I implemented a method to obtain that queue
name. In a hackish way, I implemented a call from the javascript
client to set the queue property of the auto Queue object to the
actual queue name.

So, once your queue is declared, you can say q.queue =
MQ.dispatch("getAutoQueueName");

I really need to implement a onDeclare callback and properly handle
it. But this short term work around might keep you going.

--Dan

Phillip Neumann

unread,
Apr 23, 2010, 3:05:29 PM4/23/10
to amq...@googlegroups.com
Hello Dan,

Greate, thank for implementing the getAutoQueueName call.

About the headers your right, i could specify that data in the
payload, but im trying to do integrate with a process 'on the other
end' that already has implemented RPC using the headers data.
I guess i'll need to stick a process in the server that could
translate this, or better jet, learn actionscritpt.

Thanks!

Dan Simpson

unread,
Apr 23, 2010, 3:07:19 PM4/23/10
to amq...@googlegroups.com
If you do make any changes, please let me know via patches or a pull request.

Thanks

To unsubscribe from this group, send email to amqp-js+u...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/amqp-js?hl=en.

--
You received this message because you are subscribed to the Google Groups "amqp-js" group.
To post to this group, send email to amq...@googlegroups.com.
To unsubscribe from this group, send email to amqp-js+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/amqp-js?hl=en.


--
You received this message because you are subscribed to the Google Groups "amqp-js" group.
To post to this group, send email to amq...@googlegroups.com.
To unsubscribe from this group, send email to amqp-js+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/amqp-js?hl=en.

Reply all
Reply to author
Forward
0 new messages