Hello guys, is it possible to use <message Pact >f...
# pact-ruby
a
Hello guys, is it possible to use message Pact for ActiveSupport::Notification messages? It seems like
no
, because ActiveSupport::Notification, as I understand, is using memory for a queue, but not the external requests that are expected by Pact, so probably it can be done only via some other Message Queue, like Kafka, for example:
Copy code
ActiveSupport::Notifications.subscribe("my_message") do |payload|
  Kafka.produce(queue: 'test-queue', message: payload)
end
where
Kafka.produce
can be handled by Pact. However, in this way there is makes sense to remove ActiveSupport::Notifications and keep using only Kafka but it’s different story. Is anybody was trying to use Pact for ActiveSupport::Notification somehow? Appreciate any feedback/thought πŸ™
b
@Alex Strizhak you can use message pact for anything - just decouple the transport mechanism from the business logic
πŸ‘€ 1
whatever business logic happens to the message - test that bit, not the active support or kafka bit.
πŸ‘Œ 1
a
Thanks for the reply! I will try to figure out how it can be done