[rabbitmq-discuss] properties.headers in Perl client

Christian Legnitto clegnitto at mozilla.com
Wed Dec 22 00:24:33 GMT 2010


Net::RabbitFoot lets you set the headers as well. Take a look at how I do it @ https://github.com/LegNeato/bugzilla-push/blob/master/Push/lib/Backend/AMQP.pm#L127 (though I am not sure I actually pass any headers anywhere for that backend).

The code in RabbitFoot is @ https://github.com/cooldaemon/RabbitFoot/blob/master/lib/AnyEvent/RabbitMQ/Channel.pm#L275

Thanks,
Christian


On Dec 21, 2010, at 12:51 PM, vickerto wrote:

> Awesome, thanks!  I'll take a look.
> 
> 
> On Dec 21, 1:47 pm, Emile Joubert <em... at rabbitmq.com> wrote:
>> Hi vickerto,
>> 
>> I can confirm that POE::Component::Client::AMQP (by Eric Waters) lets
>> you set headers. This works for me:
>> 
>>      $queue->publish($msg,
>>        {
>>          headers => { 'key' => 'value'}
>>        }
>>      );
>> 
>> Regards
>> 
>> Emile
>> 
>> Op 21/12/2010 20:11, het vickerto geskryf:
>> 
>>>  From what I've seen, most of them just set the headers to an empty
>>> AMQP table with no way of setting them.  I'm taking a look at possibly
>>> updating Net::RabbitMQ (which uses librabbitmq) to accept the headers
>>> and process them, but I'm going to have to dust off the part of my
>>> brain that contains my knowledge of Perl and C :)
>> 
>>> On Dec 21, 12:41 pm, David Wragg<da... at rabbitmq.com>  wrote:
>>>> Hi Tom,
>> 
>>>> vickerto<vicke... at gmail.com>  writes:
>>>>> I have successfully implemented a messaging system using one of the
>>>>> PHP clients that I found on the web.  I am currently working on a Perl
>>>>> counterpart that can send and receive messages to/from the same
>>>>> system.
>> 
>>>>> The problem that I am running into is that I was successfully able to
>>>>> use the properties.headers to store some key/value information about
>>>>> my message in the PHP client, but I have yet to find a Perl client
>>>>> that actually supports or uses these headers.  Am I missing something
>>>>> or does nobody actually use these headers in Perl?
>> 
>>>> Not all AMQP applications use the message headers, so it's plausible
>>>> that no-one has yet bothered to add support to the Perl clients.  Though
>>>> it would be a fairly significant omission, given that the headers are
>>>> (potentially) a part of every AMQP message.  I'm not aware of other
>>>> clients that take this short cut.
>> 
>>>> David
>> 
>> _______________________________________________
>> rabbitmq-discuss mailing list
>> rabbitmq-disc... at lists.rabbitmq.comhttps://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss



More information about the rabbitmq-discuss mailing list