Skip to content

Commit

Permalink
fix exchange type
Browse files Browse the repository at this point in the history
  • Loading branch information
nkonev committed Oct 16, 2023
1 parent f79cc4f commit 1ad062a
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@ public class RabbitMqTestConfig {

@Bean
public Exchange aaaExchange() {
return new FanoutExchange(QUEUE_PROFILE_EVENTS_NAME, true, false);
return new DirectExchange(QUEUE_PROFILE_EVENTS_NAME, true, false);
}

@Bean
5 changes: 5 additions & 0 deletions chat/listener/rabbitmq.go
Original file line number Diff line number Diff line change
@@ -68,6 +68,11 @@ func CreateAaaChannel(connection *rabbitmq.Connection, onMessage AaaUserProfileU
},
})

err := channel.ExchangeDeclare(AaaEventsExchange, "direct", true, false, false, false, nil)
if err != nil {
return err
}

aQueue := createAndBind(aaaEventsQueue, "", AaaEventsExchange, channel)
listen(channel, aQueue, onMessage, lc)
return nil

0 comments on commit 1ad062a

Please sign in to comment.