RED-9331: Explore possibilities for fair upload / analysis processing per tenant
* dynamic queue names for pods
This commit is contained in:
parent
0a6090babe
commit
0996c8cd71
@ -7,29 +7,5 @@ import com.knecon.fforesight.tenantcommons.queue.TenantMessagingConfiguration;
|
||||
@Configuration
|
||||
public class TenantMessagingConfigurationImpl extends TenantMessagingConfiguration {
|
||||
|
||||
public static final String TENANT_CREATED_EVENT_QUEUE = "ocr-tenant-created-queue";
|
||||
public static final String TENANT_DELETED_EVENT_QUEUE = "ocr-tenant-deleted-queue";
|
||||
public static final String TENANT_EVENTS_DLQ = "ocr-tenant-events-dlq";
|
||||
|
||||
|
||||
@Override
|
||||
protected String getTenantCreatedQueueName() {
|
||||
|
||||
return TENANT_CREATED_EVENT_QUEUE;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected String getTenantDeletedQueueName() {
|
||||
|
||||
return TENANT_DELETED_EVENT_QUEUE;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected String getTenantEventsDLQName() {
|
||||
|
||||
return TENANT_EVENTS_DLQ;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -51,7 +51,7 @@ public class TenantExchangeMessageReceiverImpl extends TenantExchangeMessageRece
|
||||
|
||||
|
||||
@RabbitHandler
|
||||
@RabbitListener(queues = TENANT_CREATED_EVENT_QUEUE)
|
||||
@RabbitListener(queues = "#{tenantMessagingConfigurationImpl.getTenantCreatedQueueName()}")
|
||||
public void reactToTenantCreation(TenantCreatedEvent tenantCreatedEvent) {
|
||||
|
||||
super.reactToTenantCreation(tenantCreatedEvent);
|
||||
@ -59,7 +59,7 @@ public class TenantExchangeMessageReceiverImpl extends TenantExchangeMessageRece
|
||||
|
||||
|
||||
@RabbitHandler
|
||||
@RabbitListener(queues = TENANT_DELETED_EVENT_QUEUE)
|
||||
@RabbitListener(queues = "#{tenantMessagingConfigurationImpl.getTenantDeletedQueueName()}")
|
||||
public void reactToTenantDeletion(TenantResponse tenantResponse) {
|
||||
|
||||
super.reactToTenantDeletion(tenantResponse);
|
||||
|
||||
@ -21,4 +21,6 @@ management:
|
||||
probability: ${TRACING_PROBABILITY:1.0}
|
||||
otlp:
|
||||
tracing:
|
||||
endpoint: ${OTLP_ENDPOINT:http://otel-collector-opentelemetry-collector.otel-collector:4318/v1/traces}
|
||||
endpoint: ${OTLP_ENDPOINT:http://otel-collector-opentelemetry-collector.otel-collector:4318/v1/traces}
|
||||
|
||||
POD_NAME: ocr-service
|
||||
Loading…
x
Reference in New Issue
Block a user