[rabbitmq-discuss] webhooks plugin

Jon Brisbin jon.brisbin at npcinternational.com
Wed Aug 25 22:47:59 BST 2010


On Aug 25, 2010, at 4:28 PM, Jon Brisbin wrote:

> 
> On Aug 25, 2010, at 4:00 PM, Jon Brisbin wrote:
> 
>> The day's not over, but I've made some pretty good progress on the webhooks plugin today. Got the plugin starting inside the broker and listening to external messages, etc...
>> 
>> Now I just need to plug lhttpc into the gen_server I'm using for handling messages and I'll be done with the first alpha!
>> 
>> I'm wondering now how the best way to handle payload data is in the erlang client? I seem to be crashing the broker when trying to do anything with it. It looks like this in the console:
>> 
>> <<"{ \"my\": \"test\" }">>
>> 
>> I don't know what it doesn't like about that. Looks like valid JSON data to me. I'm sending this message from my Groovy DSL.
>> 
>> How do I need to define my handle_call() function to get access to the payload without causing the broker to barf? I'm using:
>> 
>> handle_call({Info, Msg}, State) 
> 
> 
> I meant handle_info() here, not handle_call()...
> 
> I'm trying to filter out basic.consume_ok and other stuff. Pattern matching these isn't being nice to me. :/

It was semi-colons. Arg. :P

Well...it was semi-colons (or lack thereof) AND the fact that the docs out in the wild aren't accurate any more (attributes on records have changed so pattern matches don't match any more).

I'll write up a blog post or something with an example of using a Pid as a consumer with 2.0/0-9-1.

Jon Brisbin
Portal Webmaster
NPC International, Inc.



More information about the rabbitmq-discuss mailing list