[rabbitmq-discuss] How to get custom header

cw storm cwstorm at gmail.com
Wed Jan 29 16:10:55 GMT 2014


Actually, I have to cast it to a string and it compile successfully.
 Thanks MK

String strFirstName = properties.getHeaders().get("FirstName").toString();


On Wed, Jan 29, 2014 at 11:08 AM, cw storm <cwstorm at gmail.com> wrote:

> Thanks MK.  I'll give that a try.  So, can I map it to a string like this:
>
> String strFirstName = properties.getHeaders().get("FirstName");
>
>
> On Wed, Jan 29, 2014 at 10:54 AM, Michael Klishin <
> michael.s.klishin at gmail.com> wrote:
>
>>
>> 2014-01-29 cw storm <cwstorm at gmail.com>
>>
>> java.util.Map<String,Object> headers = new
>>> java.util.HashMap<String,Object>();
>>> headers.put("FirstName", strFirstName);
>>>
>>> So, when I consume the message, how can I get "Firstname" value?
>>>
>>
>> properties.getHeaders().get("FirstName"");
>>  --
>> MK
>>
>> http://github.com/michaelklishin
>> http://twitter.com/michaelklishin
>>
>> _______________________________________________
>> rabbitmq-discuss mailing list
>> rabbitmq-discuss at lists.rabbitmq.com
>> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20140129/8a526326/attachment.html>


More information about the rabbitmq-discuss mailing list