Class BasicAuthSempClient

java.lang.Object
org.apache.beam.sdk.io.solace.broker.BasicAuthSempClient
All Implemented Interfaces:
Serializable, SempClient

@Internal public class BasicAuthSempClient extends Object implements SempClient
A class that manages REST calls to the Solace Element Management Protocol (SEMP) using basic authentication.

This class provides methods to check necessary information, such as if the queue is non-exclusive, remaining backlog bytes of a queue. It can also create and execute calls to create queue for a topic.

See Also:
  • Constructor Details

    • BasicAuthSempClient

      public BasicAuthSempClient(String host, String username, String password, String vpnName, org.apache.beam.sdk.util.SerializableSupplier<com.google.api.client.http.HttpRequestFactory> httpRequestFactorySupplier)
  • Method Details

    • isQueueNonExclusive

      public boolean isQueueNonExclusive(String queueName) throws IOException
      Description copied from interface: SempClient
      Determines if the specified queue is non-exclusive. In Solace, non-exclusive queues allow multiple consumers to receive messages from the queue.
      Specified by:
      isQueueNonExclusive in interface SempClient
      Throws:
      IOException
    • createQueueForTopic

      public Queue createQueueForTopic(String queueName, String topicName) throws IOException
      Description copied from interface: SempClient
      This is only called when a user requests to read data from a topic. This method creates a new queue on the Solace broker and associates it with the specified topic. This ensures that messages published to the topic are delivered to the queue, allowing consumers to receive them.
      Specified by:
      createQueueForTopic in interface SempClient
      Throws:
      IOException
    • getBacklogBytes

      public long getBacklogBytes(String queueName) throws IOException
      Description copied from interface: SempClient
      Retrieves the size of the backlog (in bytes) for the specified queue. The backlog represents the amount of data in messages that are waiting to be delivered to consumers.
      Specified by:
      getBacklogBytes in interface SempClient
      Throws:
      IOException