Skip to content

Commit

Permalink
Merge pull request #774 from folio-org/MODINV-1073
Browse files Browse the repository at this point in the history
MODINV-1073: Rename topic "linked-data.instance-ingress" to "inventor…
  • Loading branch information
askhat-abishev authored Oct 11, 2024
2 parents 3b56653 + eac76a5 commit 1c55d7b
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 4 deletions.
2 changes: 2 additions & 0 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ After setup, it is good to check logs in all related modules for errors.
* DI_INVENTORY_AUTHORITY_CREATED_READY_FOR_POST_PROCESSING_PARTITIONS
* DI_INVENTORY_AUTHORITY_UPDATED_READY_FOR_POST_PROCESSING_PARTITIONS
* DI_SRS_MARC_BIB_RECORD_MODIFIED_PARTITIONS
* INVENTORY_INSTANCE_INGRESS_PARTITIONS

Default value for all partitions is 1

## Properties
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@

public class InstanceIngressConsumerVerticle extends KafkaConsumerVerticle {

public static final String INSTANCE_INGRESS_TOPIC = "inventory.instance_ingress";

private static final Logger LOGGER = LogManager.getLogger(InstanceIngressConsumerVerticle.class);
private static final String INSTANCE_INGRESS_TOPIC = "linked-data.instance-ingress";
private static final String BASE_PROPERTY = "InstanceIngressConsumerVerticle";

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import static org.folio.DataImportEventTypes.DI_SRS_MARC_BIB_RECORD_MATCHED;
import static org.folio.DataImportEventTypes.DI_SRS_MARC_BIB_RECORD_MODIFIED;
import static org.folio.DataImportEventTypes.DI_SRS_MARC_BIB_RECORD_NOT_MATCHED;
import static org.folio.inventory.InstanceIngressConsumerVerticle.INSTANCE_INGRESS_TOPIC;

import org.folio.kafka.services.KafkaTopic;

Expand All @@ -45,7 +46,8 @@ public KafkaTopic[] createTopicObjects() {
new InventoryKafkaTopic(DI_INVENTORY_HOLDINGS_CREATED_READY_FOR_POST_PROCESSING.value(), holdingCreatedReadyForPostProcessingPartitions()),
new InventoryKafkaTopic(DI_INVENTORY_AUTHORITY_CREATED_READY_FOR_POST_PROCESSING.value(), authorityCreatedReadyForPostProcessingPartitions()),
new InventoryKafkaTopic(DI_INVENTORY_AUTHORITY_UPDATED_READY_FOR_POST_PROCESSING.value(), authorityUpdatedReadyForPostProcessingPartitions()),
new InventoryKafkaTopic(DI_SRS_MARC_BIB_RECORD_MODIFIED.value(), marcBibRecordModifiedPartitions())
new InventoryKafkaTopic(DI_SRS_MARC_BIB_RECORD_MODIFIED.value(), marcBibRecordModifiedPartitions()),
new InventoryKafkaTopic(INSTANCE_INGRESS_TOPIC, instanceIngressPartitions())
};
}

Expand Down Expand Up @@ -128,4 +130,8 @@ private Integer marcBibRecordModifiedPartitions() {
return Integer.valueOf(firstNonBlank(System.getenv(
"DI_SRS_MARC_BIB_RECORD_MODIFIED_PARTITIONS"), "1"));
}

private Integer instanceIngressPartitions() {
return Integer.valueOf(firstNonBlank(System.getenv("INVENTORY_INSTANCE_INGRESS_PARTITIONS"), "1"));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ public void setUp() {
new InventoryKafkaTopic("DI_INVENTORY_HOLDINGS_CREATED_READY_FOR_POST_PROCESSING", 1),
new InventoryKafkaTopic("DI_INVENTORY_AUTHORITY_CREATED_READY_FOR_POST_PROCESSING", 1),
new InventoryKafkaTopic("DI_INVENTORY_AUTHORITY_UPDATED_READY_FOR_POST_PROCESSING", 1),
new InventoryKafkaTopic("DI_SRS_MARC_BIB_RECORD_MODIFIED_PARTITIONS", 1)
new InventoryKafkaTopic("DI_SRS_MARC_BIB_RECORD_MODIFIED_PARTITIONS", 1),
new InventoryKafkaTopic("inventory.instance_ingress", 1)
};


Expand Down Expand Up @@ -174,6 +175,7 @@ private Future<Void> createKafkaTopicsAsync(KafkaAdminClient client) {
"folio.Default.foo-tenant.DI_INVENTORY_HOLDINGS_CREATED_READY_FOR_POST_PROCESSING",
"folio.Default.foo-tenant.DI_INVENTORY_AUTHORITY_CREATED_READY_FOR_POST_PROCESSING",
"folio.Default.foo-tenant.DI_INVENTORY_AUTHORITY_UPDATED_READY_FOR_POST_PROCESSING",
"folio.Default.foo-tenant.DI_SRS_MARC_BIB_RECORD_MODIFIED_PARTITIONS"
"folio.Default.foo-tenant.DI_SRS_MARC_BIB_RECORD_MODIFIED_PARTITIONS",
"folio.Default.foo-tenant.inventory.instance_ingress"
);
}

0 comments on commit 1c55d7b

Please sign in to comment.