-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #198 from avast/publisher-confirms
introduced publisher confirms
- Loading branch information
Showing
12 changed files
with
400 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
core/src/main/scala/com/avast/clients/rabbitmq/publisher/DefaultRabbitMQProducer.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package com.avast.clients.rabbitmq.publisher | ||
|
||
import cats.effect.{Blocker, ConcurrentEffect, ContextShift} | ||
import com.avast.bytes.Bytes | ||
import com.avast.clients.rabbitmq.api.MessageProperties | ||
import com.avast.clients.rabbitmq.logging.ImplicitContextLogger | ||
import com.avast.clients.rabbitmq.{CorrelationId, ProductConverter, ServerChannel} | ||
import com.avast.metrics.scalaeffectapi.Monitor | ||
|
||
class DefaultRabbitMQProducer[F[_], A: ProductConverter](name: String, | ||
exchangeName: String, | ||
channel: ServerChannel, | ||
defaultProperties: MessageProperties, | ||
reportUnroutable: Boolean, | ||
sizeLimitBytes: Option[Int], | ||
blocker: Blocker, | ||
logger: ImplicitContextLogger[F], | ||
monitor: Monitor[F])(implicit F: ConcurrentEffect[F], cs: ContextShift[F]) | ||
extends BaseRabbitMQProducer[F, A](name, | ||
exchangeName, | ||
channel, | ||
defaultProperties, | ||
reportUnroutable, | ||
sizeLimitBytes, | ||
blocker, | ||
logger, | ||
monitor) { | ||
override def sendMessage(routingKey: String, body: Bytes, properties: MessageProperties)(implicit correlationId: CorrelationId): F[Unit] = | ||
basicSend(routingKey, body, properties) | ||
} |
Oops, something went wrong.