For quick testing of connections and topics, the dashboard lets you create one or more test clients that connect directly to your Kafkaesque service using WebSockets. You can access the test clients using the “Test Clients” menu item.
The test client is a simple chat app that can send and receive text messages.
For each client, you can configure a number of settings, including:
- A topic for the producer and the consumer. If you use the same topic for producer and consumer, the client will send messages to itself.
- Persistent or non-persistent topics
- Subscription type (for example: Exclusive, Shared)
- Consumer or reader interface. With the consumer interface, the client receives messages in a subscription. For the reader interface, all messages stored in the topic can be received
After adjusting the settings, you can connect the client using the “Connect” button.
Once the client is connected, the “Connect” button changes to a “Disconnect” button. To change the settings of the test client, you need to first disconnect, change the settings, then connect again.
Once the test client is connected, you can send a message to the topic by entering the message in the “Your Message” field and clicking the “Send” button at the bottom of the client. Note that there is no need to create the topic(s) in advance. If you attempt to produce or consume on a topic that doesn’t exist, the system will automatically create it for you.
If the client is connected to the same topic for producing and consuming, the message you sent will be received by the client. You can see this in the message history in the middle of the app.
The right side shows messages sent and the left side shows messages received. To clear the message history, click on the “Clear” button.
You can use multiple clients at the same time. To create another client, click on the “+” button.
By creating multiple clients, you can test out various scenarios like producing and consuming to different topics to simulate bi-directional communication between to apps, send a message to multiple clients (using Exclusive subscriptions to the same topic) or round-robin delivery of messages to multiple clients (using a Shared subscription).
The test clients will automatically disconnect after 30 seconds of inactivity or if you navigate off the “Test Client” page.