fix messaging bus
All checks were successful
Build and Publish / build-release (push) Successful in 1m27s

This commit is contained in:
2026-04-16 16:35:43 -05:00
parent 9da5817f61
commit 0a3d63317b
3 changed files with 5 additions and 5 deletions

View File

@@ -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