[erlang-questions] gen_server timeout in RabbitMq publish confirm process
Ryan Brown
ryankbrown@REDACTED
Fri Apr 4 23:53:56 CEST 2014
Accidentally forgot to attach the dump file.
-rb
On Fri, Apr 4, 2014 at 3:52 PM, Ryan Brown <ryankbrown@REDACTED> wrote:
> I have an application that acts as, essentially, a rest wrapper around
> rabbitmq. (There is obviously some special logic that makes it necessary to
> build our own).
>
> Some background: We have been using this application (current code
> available at https://github.com/PearsonEducation/subpub) as an internal
> pub/sub for several years now. It has now grown dramatically in importance
> to our vision and we are beginning to get inundated with requests for
> features and enhancements. One of those enhancements is to allow publishers
> to specify with a header whether they want the application to require
> confirmed publishing to rabbit. We had begun this process by checking for
> the header value and passing down the chain. However, we are not currently
> setting-up a channel that is set for publish confirms. Anyway, TMI...
>
> The state I'm in now is that, on startup, we create connections to each of
> our brokers. In this process we create a channel and save it in state. I
> have now added logic to create a second channel on that connection that
> sets:
>
> #'confirm.select_ok'{} = amqp_channel:call(ConfirmedChannel,
> #'confirm.select'{}),
>
> And saves it to state. Then on publish, I select which one to use based on
> the values passed-down the stack from message intake. Set self() as the
> confirm handler and respond with a wait so that up the stack I can initiate
> a receive loop in the message intake which is not a gen_server. I have
> debug messages throughout and it appears that everything is happening as
> expected. I trace the message through the publish path. To being published
> and passing the wait back up to the receiver. I also see where the
> basic.ack is received and the publish_confirm acknowledgement passed all
> the way up to the receive loop. However, then things go awry. I get the
> attached dump.
>
> My take-away, although likely I am wrong, is that somewhere, apparently in
> amqp_balanced_publisher, a gen_server call is timing-out while waiting for
> a response. But, I seem to be able to trace the responses through the whole
> stack so I am thoroughly confused.
>
> I realize this is vague and additional details/code are likely still
> needed. Please let me know. I've spent way too much time on this already
> and it's getting quite frustrating. And I know I am likely missing
> something obvious but am finding supporting documentation for erlang
> lacking. But I'm probably just looking in the right places.
>
> Best regards,
>
> Ryan
>
> --
> -rb
>
--
-rb
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20140404/fe621d9a/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pub_confirm_dump
Type: application/octet-stream
Size: 41657 bytes
Desc: not available
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20140404/fe621d9a/attachment.obj>
More information about the erlang-questions
mailing list