Pact-JVM supports Message Packages that encapsulate a message that is consumed (one way) by some mechanism, usually a message queue. The idea is to test a consumer code that can consume a message through a consumer test, and then verify that the supplier generates the corresponding message. The actual message queue is not used in the test.

It was originally designed to apply contract tests for Kafka's messaging services.
Tests are performed in two parts, like Request-Response Pact tests, except that the consumer reads the message during the consumer pact test and, if successful, the pact file is written. Then the provider code is called to generate the message, and this maps to what is in the pact file.

Pact-JVM: