We are using java, Akka framework and azure event hub. We are using akka framework's groupedWeightedWithin to group messages based on the total number of bytes or duration. I don't know how to set the partition key so that a particular device's messages goes to the same partition all the time. Before implementing batching we were setting device id as the partition key to guarantee that. Can someone suggest how to group messages and calculate the partition key so that each message goes to the same partition every time.
How to group messages so that they go to the same partition every time?
61 Views Asked by Venky At
1
There are 1 best solutions below
Related Questions in APACHE-KAFKA
- No method found for class java.lang.String in Kafka
- How to create beans of the same class for multiple template parameters in Spring
- Troubleshoot .readStream function not working in kafka-spark streaming (pyspark in colab notebook)
- Handling and ignore UNKNOWN_TOPIC_OR_PARTITION error in Kafka Streams
- Connect Apache Flink with Apache kudu as sink using Pyflink
- Embedded Kafka Failed to Start After Spring Starter Parent Version 3.1.10
- Producer Batching Service Bus Vs Kafka
- How to create a docker composer environment where containers can communicate each other?
- Springboot Kafka Consumer unable to maintain connect to kafka cluster brokers
- Kafka integration between two micro service which can respond back to the same function initiated the request
- Configuring Apache Spark's MemoryStream to simulate Kafka stream
- Opentelemetry Surpresses Kafka Produce Message Java
- Kafka: java.lang.NoClassDefFoundError: Could not initialize class org.apache.logging.log4j.core.appender.mom.kafka.KafkaManager
- MassTransit Kafka producers configure to send several events to the same Kafka topic
- NoClassDefFoundError when running JAR file with Apache Kafka dependencies
Related Questions in AKKA
- Akka-persistence, tagging past event
- how to migate a Akka cluster without stopping service
- Await.result always hangs/timeout and never returns result (Scala - Akka actors)
- Can we create akka actor from the context of shard actor?
- Optimizing CPU Utilization and Throughput in Akka / Pekko Streams on HTTP
- Handling of WebSocket Client Messages in Play Framework
- akka PubSub not working across distributed system
- Handling WebSocket Connections in Play Framework
- Propagating exception to root actor
- akka stream merge data from multiple replicas system
- akka.presistance.postgresql too many clients already
- Akka Streams: How to construct a Source of Sources with GraphDSL?
- Skip flow on failure akka streams
- How to regulate the speed between actors in java?
- Keep ordering by merging multiple slow sources in akka streams
Related Questions in AZURE-EVENTHUB
- Error indexing method 'IntegrationFunction' Can't convert from type 'Microsoft.Azure.EventHubs.EventData
- Handling multiple return values in an Azure function
- Azure Event Hub Connection when creating Event Hub Trigger with function app in Terraform
- Azure Event Hub metrics on Application Insights
- How can I view the IP addesses that have connected to a Azure Eventhub through Shared access policy?
- Verify if the logs of the type "WAF, FW, StorageAccount, Application " are sent ot the Eventhub
- Publish to an Azure Event Hub with output bindings and use partition keys
- Error pushing data in an Azure Function to an Azure Event Hub
- JAAS configuration for Managed Identity for Kafka-Connect in Azure
- How can I write to delta from protobuf encoded events?
- Ingesting logs from Azure Blob Storage to Loki
- Committing messages are not getting recorded as Outgoing Message
- flutter http get function to azure http trigger
- Azure function event hub trigger to flutter web app
- Spark Structured Streaming with TriggerAvailableNow and Eventhubs
Related Questions in AKKA-KAFKA
- how can we control polling messages from kafka queue using akka kafka connector
- Resetting offset for partition after (Re-)joining group
- How to capture alpakka kafka source stream failure after max RestartSource
- How to group messages so that they go to the same partition every time?
- Why does auto-commit enabled Kafka client commit latest produced message's offset during consumer close even if the message was not consumed yet?
- Akka Kafka Consumer processing rate decreases drastically when lag is there in our Kafka Partitions
- Fast Processing Topic and Slow Processing Topic - Akka Kafka
- Is this Akka Kafka Stream configuration benefits from Back Pressure mechanism of the Akka Streams?
- Lagom topic subscriber - how to retry in Future Exception?
- Akka streams Kafka consumer process parallel
- How Akka stream internal and explicit buffer interact with the underlying kafka client settings in alpakka Kafka?
- Is there functionality in the akka-Kafka (scala framework) to list all available topics
- avro4s can not deserialize AnyRef
- Troubles with AVRO schema update
- Incompatible equality constraint while using Akka Kafka Streams
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
In the producer config, you can set
partitioner.classto aPartitionerimplementation to return whatever integer you want for your given recordOtherwise, just set the key of the
ProducerRecordto equivalent values, and they'll already go to the same partition (as of Kafka 3.3 you need to setpartitioner.ignore.keys=true)