lib/deimos/backends/base.rb in deimos-ruby-1.17.0 vs lib/deimos/backends/base.rb in deimos-ruby-1.17.1
- old
+ new
@@ -9,10 +9,10 @@
# @param messages [Array<Deimos::Message>]
# @return [void]
def publish(producer_class:, messages:)
Deimos.config.logger.info(
message: 'Publishing messages',
- topic: producer_class.topic,
+ topic: messages.first&.topic,
payloads: messages.map do |message|
{
payload: message.payload,
key: message.key
}