Plug.AMQP.Conn (PlugAMQP v0.6.0) View Source
Adapter for AMQP to Plug.Conn
This adapter partially implements the Plug.Conn.Adapter behaviour, with the following caveats:
Plug.Conn.Adapter.send_file/6
,Plug.Conn.Adapter.send_chunked/3
andPlug.Conn.Adapter.chunk/2
raise, because there is no such functionality in AMQP. AlsoPlug.Conn.Adapter.push/3
andPlug.Conn.Adapter.inform/3
are not supported.Plug.Conn.Adapter.read_req_body/2
ignores the options and always returns the whole message body.request_path
is taken from the routing_key, by replacing dots with slashes and prepending a slash. This will play nice with existing plugs that expect url-like paths.method
is"POST"
by default. You can override this behaviour setting a custom method in thex-method-override
header.
Link to this section Summary
Link to this section Functions
Specs
conn( GenServer.server(), Plug.AMQP.ConsumerProducer.payload(), Plug.AMQP.ConsumerProducer.headers() ) :: Plug.Conn.t()