fix messaging bus
All checks were successful
Build and Publish / build-release (push) Successful in 1m27s
All checks were successful
Build and Publish / build-release (push) Successful in 1m27s
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
defmodule PolicyService.MessageBus do
|
||||
use AMQP
|
||||
|
||||
def publish(routing_key, event) do
|
||||
def publish(exchange, routing_key, event) do
|
||||
payload = Jason.encode!(event)
|
||||
|
||||
:ok =
|
||||
AMQP.Basic.publish(channel(), "policy_service.events", routing_key, payload,
|
||||
AMQP.Basic.publish(channel(), exchange, routing_key, payload,
|
||||
content_type: "application/json",
|
||||
persistent: true
|
||||
)
|
||||
@@ -18,4 +18,4 @@ defmodule PolicyService.MessageBus do
|
||||
end
|
||||
|
||||
defp amqp_url, do: Application.fetch_env!(:policy_service, :amqp_url)
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user