Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:20
turtle
0034-turtle_publisher-add-clause-to-handle_rpc-...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0034-turtle_publisher-add-clause-to-handle_rpc-2-for-exis.patch of Package turtle
From 1bc8c6cce6fe253bf1e0a1f7106189fd97591592 Mon Sep 17 00:00:00 2001 From: Led <ledest@gmail.com> Date: Wed, 6 Nov 2019 17:09:36 +0200 Subject: [PATCH] turtle_publisher: add clause to handle_rpc/2 for existing queue --- src/turtle_publisher.erl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/turtle_publisher.erl b/src/turtle_publisher.erl index 4460b92..5d41df9 100644 --- a/src/turtle_publisher.erl +++ b/src/turtle_publisher.erl @@ -315,6 +315,9 @@ handle_confirms(_, _) -> ok. %% Different ways of enabling RPC on the connection. If given `enable' it just creates %% an anonymous queue. If given `{enable, Q}' It looks for that queue. %% @end +handle_rpc(Channel, #{ rpc := {existing, Q}}) -> + {ok, Tag} = turtle:consume(Channel, Q), + {ok, Q, Tag}; handle_rpc(Channel, #{ rpc := {enable, Q}}) -> #'queue.declare_ok' {} = amqp_channel:call(Channel, #'queue.declare' { exclusive = true, auto_delete = true, durable = false, queue = Q }), -- 2.16.4
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor