Best practices

Real-time inventory logistics data management is vitally important. It helps to ensure timely deliveries, lower holding costs, and a superior customer experience.

Streaming inventory logistics data involves concise messages, with each averaging 100 bytes, including fields like product code, quantity, timestamp, and location code. Inventory data streams often carry thousands of messages per second (m/s) and can be spiky, such as when stocks are replenished in batches or when large shipments are received and logged.

The Apache Kafka partition calculator inputs below are typical for small, medium, and large-scale inventory data streams.

Kafka UI for your team

Results

number of producers
512
number of consumer
4,096
Expected lag
2,500
number of partitions
4,096

Business size preset

The size of the company in terms of article production (not number of employees, readership numbers, market capitalization, etc…)
Medium

Number of brokers

The number of brokers in the cluster where the topic will be created.
1 140

Producer processing time

The average time it takes to produce a message in ms.
ms
0.1 ms1,000 ms

Consumer processing time

The average amount of time it takes to consume a message in ms.
ms
0.1 ms1,000 ms

Throughput

The amount of messages that the system should process per second.
msg/s
1 msg/s10,000 msg/s

How to increase partitions

Learn how to to increase your topic partitions and what effects this will have on your cluster.

Read full article

Recommended configuration for a medium business size

  • An expected lag (L) of X1, given the speed and frequency of inventory updates.
  • Producers (RP) number X2, ensuring consistent data flow.
  • With X3 consumers (RC), real-time inventory updates are guaranteed.
  • Partitions (NP) soar to X4, optimizing data distribution for swift processing.

With this Kafka partitioning configuration, inventory logistics data should stream efficiently so that it is up-to-date and can enable better supply chain predictions and decisions, and make sure products are in the right place at the right time.