fix exchanges
All checks were successful
Build and Publish / build-release (push) Successful in 1m25s

This commit is contained in:
2026-04-16 14:55:34 -05:00
parent ec69df8e95
commit c485d37b6b
3 changed files with 30 additions and 5 deletions

View File

@@ -6,7 +6,7 @@ defmodule PolicyService.Consumers.PolicyIssuedConsumer do
alias PolicyService.Commands.CarPolicy
alias PolicyService.Aggregates.PolicyId
@exchange "carrier_inbox.events"
@exchange "policy_service.events.policy_issued"
@queue "policy_service.policy_issued"
@routing_key "policy.issued"
@@ -16,7 +16,6 @@ defmodule PolicyService.Consumers.PolicyIssuedConsumer do
{:ok, conn} = AMQP.Connection.open(amqp_url())
{:ok, channel} = AMQP.Channel.open(conn)
AMQP.Exchange.topic(channel, @exchange, durable: true)
AMQP.Queue.declare(channel, @queue, durable: true)
AMQP.Queue.bind(channel, @queue, @exchange, routing_key: @routing_key)
AMQP.Basic.qos(channel, prefetch_count: 10)

View File

@@ -7,7 +7,7 @@ defmodule PolicyService.Consumers.QuoteReceivedConsumer do
alias PolicyService.Commands.CarPolicy
alias PolicyService.Aggregates.PolicyId
@exchange "carrier_inbox.events"
@exchange "policy_service.events.quote_received"
@queue "policy_service.quote_received"
@routing_key "quote.received"
@@ -21,8 +21,6 @@ defmodule PolicyService.Consumers.QuoteReceivedConsumer do
{:ok, conn} = AMQP.Connection.open(amqp_url)
{:ok, channel} = AMQP.Channel.open(conn)
AMQP.Exchange.declare(channel, @exchange, :topic, durable: true)
AMQP.Queue.declare(channel, @queue, durable: true)
AMQP.Queue.bind(channel, @queue, @exchange, routing_key: @routing_key)

View File

@@ -138,6 +138,34 @@ rawResources:
configure: ".*"
read: ".*"
exchange-quote-received:
enabled: true
apiVersion: rabbitmq.com/v1beta1
kind: Exchange
suffix: exchange-quote-received
spec:
spec:
name: policy_service.events.quote_received
type: topic
durable: true
rabbitmqClusterReference:
name: rabbitmq
namespace: rabbitmq
exchange-policy-issued:
enabled: true
apiVersion: rabbitmq.com/v1beta1
kind: Exchange
suffix: exchange-policy-issued
spec:
spec:
name: policy_service.events.policy_issued
type: topic
durable: true
rabbitmqClusterReference:
name: rabbitmq
namespace: rabbitmq
password-generator:
enabled: true
apiVersion: generators.external-secrets.io/v1alpha1