Skip to main content

Mock Connector

The Mock Connector is a connector that doesn't enqueue the message but instead it calls the callback function directly.

It is ideal for testing purposes and doesn't require any extra configuration or installation.


Instantiate the Connector

// Register the connector and associate with a scheme

// Create a connector
$connector = ConnectorFactory::create(new Uri("mock://local"));

Public & Consume

It is the same as the other connectors. See the for more information.


ProtocolURI ExampleNotes
mockmock://localThis emulates a pub/sub consumer. It is for use on tests.

Open source ByJG