RED-8702: Explore document databases to store entityLog

- renamed beans to avoid clash with database-tenant-commons
This commit is contained in:
maverickstuder 2024-04-03 18:51:12 +02:00
parent 4b61642734
commit 978323c0c7

View File

@ -21,10 +21,10 @@ import lombok.RequiredArgsConstructor;
public class MongoTenantMessagingConfiguration {
@Value("${fforesight.mongo.multitenancy.tenant-created-queue:mongo-tenant-created}")
private String tenantCreatedEventQueue;
private String mongoTenantCreatedEventQueue;
@Value("${fforesight.mongo.multitenancy.tenant-created-dlq:mongo-tenant-created-dlq}")
private String tenantCreatedDLQ;
private String mongoTenantCreatedDLQ;
@Bean(name = "mongoTenantExchange")
@ -37,21 +37,21 @@ public class MongoTenantMessagingConfiguration {
@Bean("persistenceServiceMongoTenantCreatedQueue")
public Queue persistenceServiceMongoTenantCreatedQueue() {
return QueueBuilder.durable(tenantCreatedEventQueue)
.withArgument("x-dead-letter-exchange", "").withArgument("x-dead-letter-routing-key", tenantCreatedDLQ).build();
return QueueBuilder.durable(mongoTenantCreatedEventQueue)
.withArgument("x-dead-letter-exchange", "").withArgument("x-dead-letter-routing-key", mongoTenantCreatedDLQ).build();
}
@Bean
@Bean("persistenceServiceMongoTenantDLQ")
public Queue persistenceServiceMongoTenantDLQ() {
return QueueBuilder.durable(tenantCreatedDLQ).build();
return QueueBuilder.durable(mongoTenantCreatedDLQ).build();
}
@Bean
public Binding tenantExchangeBinding(@Qualifier("persistenceServiceMongoTenantCreatedQueue") Queue persistenceServiceTenantCreatedQueue,
@Qualifier("mongoTenantExchange") TopicExchange tenantExchange) {
@Bean("mongoTenantExchangeBinding")
public Binding mongoTenantExchangeBinding(@Qualifier("persistenceServiceMongoTenantCreatedQueue") Queue persistenceServiceTenantCreatedQueue,
@Qualifier("mongoTenantExchange") TopicExchange tenantExchange) {
return BindingBuilder.bind(persistenceServiceTenantCreatedQueue).to(tenantExchange).with("tenant.created");
}