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?
59 Views Asked by Venky At
1
There are 1 best solutions below
Related Questions in APACHE-KAFKA
- Spark streaming + kafka throughput
- How to diagnose Kafka topics failing globally to be found
- kafka: what do 'soTimeout', 'bufferSize' and 'minBytes' mean for SimpleConsumer?
- Fail to create SparkContext
- Syntax error on tokens, delete these tokens - kafka spring integration demo application
- How could Kafka 0.8.2.1 with offsets.storage=kafka still require ZooKeeper?
- Message Queues: Per Message Guarantees
- How should a Kafka HLC figure out the # of partitions for a topic?
- Kafka multiple consumers for a partition
- Should Apache Kafka and Hadoop be installed seperatedly (on a diffrent cluster)?
- how does one combine kafka-node producer and node tail?
- How to fix NoClassDefFoundError with custom Kafka producer under Eclipse?
- Apache Samza's CheckpointTool won't give away partition offsets
- Offsets for Kafka Direct Approach in Spark 1.3.1
- Simulate kafka broker failures in multi node kafka cluster and what operations and tools to use to mitigate data loss issues
Related Questions in AKKA
- Akka actor invoked with a function delegate - is this bad practice?
- Akka supervisor on stop of subordinate
- Scala - TCP Packet frame using Akka
- Akka-http process requests with Stream
- Multiple dispatcher for spray
- Spray Dead Letter msg
- ActorNotFound Exception trying to run Spark 1.3.1 on windows 7
- What's the best way to get members of an Akka cluster?
- Is it possible to await for second response in Scala
- How to keep Akka running all the time in Play 2.3
- Suspending AKKA actor
- Spray Client (i.e. AKKA) within Tomcat, cause Threading issue
- Can I use Akka scheduler to schedule multiple things from a single actor context?
- akka: pattern for combining messages from multiple children
- Akka: multiple dispatcher vs multiple actor system
Related Questions in AZURE-EVENTHUB
- How to send data as CSV on Eventhub for Azure Stream Analytics?
- Stream Analytics Output
- Any APIs to get list of consumer groups created in Azure IotHub?
- Azure Cloud Service - EventProcessor IEventProcessor.ProcessEventsAsync not getting hit
- (412) A lease ID was specified, but the lease for the blob has expired
- What is causing Azure Event Hubs ReceiverDisconnectedException/LeaseLostException?
- When does Azure's EventProcessorHost call IEventProcessor.ProcessEventsAsync?
- What Azure .NET SDK EventHubClient instance methods are threadsafe?
- Load testing Azure EventHub
- Azure ServiceBus Eventhub, is the "offset" still available/durable when some of event data is expired?
- Why can't EventData.GetBytes() be called before sending?
- Message payload change while adding extra property in the main eventmessage to IoT Hub - (Using rest client)
- Event Hub receiver does not read all messages
- How can I use the Azure ServiceBus EventProcessorHost library with a short-lived SAS token?
- How would I use Reddis + Azure Event Hubs to handle mobile push notifications archiving for billions of topics?
Related Questions in AKKA-KAFKA
- Resetting offset for partition after (Re-)joining group
- Is this Akka Kafka Stream configuration benefits from Back Pressure mechanism of the Akka Streams?
- avro4s can not deserialize AnyRef
- How Akka stream internal and explicit buffer interact with the underlying kafka client settings in alpakka Kafka?
- Akka Kafka stream supervison strategy not working
- Fast Processing Topic and Slow Processing Topic - Akka Kafka
- Reactive-Kafka Stream Consumer: Dead letters occured
- How to group messages so that they go to the same partition every time?
- Akka streams Kafka consumer process parallel
- Incompatible equality constraint while using Akka Kafka Streams
- What is a good pattern for committing Kafka consumer offset after processing message?
- How do you return a future containing a list of messages after all available messages have been consumed from a Kafka topic?
- Getting last message from kafka Topic using akka-stream-kafka when connecting with websocket
- Troubles with AVRO schema update
- Kafka producer with adjustable amount of messages per second
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 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)