### Micro-Integration Manager Start Command Example Source: https://docs.solace.com/Micro-Integrations/Self-Managed/Connector-Manager/connector-manager.htm Example of the expected CLI command to start Micro-Integration Manager, including paths for configuration and additional locations. ```bash java -jar <...ABSOLUTE_PATH...>/solace-micro-integration-manager-2.0.0.jar --spring.cloud.config.server.git.uri=file://<...ABSOLUTE_PATH...>/samples/manager/cloud-configs/ --spring.config.additional-location=config/ ``` -------------------------------- ### Example: Install JCSMP JAR and POM Locally Source: https://docs.solace.com/API/API-Developer-Guide-Java/Java-build-projects.htm This example demonstrates installing JCSMP JAR and POM files into a local repository, showing the command and the resulting file structure. ```bash $ mvn install:install-file  -Dfile=/downloads/sol-jcsmp/lib/sol-jcsmp-10.x.x.jar        -DpomFile=/downloads/sol-jcsmp/lib/sol-jcsmp-10.x.x.pom  -Dmaven.repo.local=./.repository  $ ls /tmp/.repository/com/solace/sol-jcsmp/10.x.x/  _remote.repositories sol-jcsmp-10.x.x.jar sol-jcsmp-10.x.x.pom ``` -------------------------------- ### Example Helm Chart Installation Source: https://docs.solace.com/Cloud/Deployment-Considerations/installing-ps-cloud-k8s-install-mca.htm An example of how to install the Mission Control Agent Helm chart with specific release name and URL. This demonstrates the typical parameters used during installation. ```bash helm install cloud-agent-rel \ http://URL.fromSolace.com/chart --namespace orgnameabc \ --values values.yaml ``` -------------------------------- ### Example: Install SolSuite POM Locally Source: https://docs.solace.com/API/API-Developer-Guide-Java/Java-build-projects.htm This command shows how to install the SolSuite POM file into a local Maven repository. ```bash $ mvn install:install-file -Dfile=/downloads/sol-jcsmp/lib/solsuite-10.x.x.pom   -DpomFile=/downloads/sol-jcsmp/lib/solsuite-10.x.x.pom   -Dmaven.repo.local=./.repository ``` -------------------------------- ### Example: Install Solace JMS API .jar Locally Source: https://docs.solace.com/API/Solace-JMS-API/Building-JMS-Projects-With-Maven.htm Example of using the install:install-file goal to add a Solace JMS API .jar and its pom file to a local repository. ```bash $ mvn install:install-file \   -Dfile=/downloads/sol-jms/lib/sol-jms-10.x.x.jar \   -DpomFile=/downloads/sol-jms/lib/sol-jms-10.x.x.pom \   -Dmaven.repo.local=./.repository \ $ ls /tmp/.repository/com/solace/sol-jms/10.x.x/ \ _remote.repositories sol-jms-10.x.x.jar sol-jms-10.x.x.pom ``` -------------------------------- ### HelloWorldSub Example Source: https://docs.solace.com/API-Developer-Online-Ref-Documentation/c/_intro_2_hello_world_sub_8c-example.html This C code snippet demonstrates the basic setup for receiving a direct message. It includes necessary headers and initializes a message counter. This example is intended for basic demonstration purposes. ```c #include "os.h" #include "solclient/solClient.h" #include "solclient/solClientMsg.h" /* Message Count */ static int msgCount = 0; ``` -------------------------------- ### Async Cache Request Example Setup Source: https://docs.solace.com/API-Developer-Online-Ref-Documentation/c/ex_2ios_2examples_2_async_cache_request_example_8h-example.html This Objective-C code sets up the AsyncCacheRequestExample class, which inherits from a base Example class. It's typically used as a starting point for implementing asynchronous cache operations. ```objective-c /* * Copyright 2009-2025 Solace Corporation. All rights reserved. */ #import "Example.h" @interface AsyncCacheRequestExample : Example @end ``` -------------------------------- ### Show Hardware Detail Example Source: https://docs.solace.com/Monitoring/Monitoring-Blades.htm This example demonstrates the output of the 'show hardware detail' command, providing comprehensive information about the appliance's platform, chassis, CPU, power supplies, disks, and installed blades. ```cli solace> show hardware detail ``` ```text Platform:          Solace 3560 Chassis Product #: CHS-3560AC-01-A Chassis revision:  1.5 Chassis serial:    S009000936 Board serial:      QSCP34400454 Board Part Number: G50768-510 BIOS Version:      SE5C600.86B.02.01.0002.082220131453 CPU1 Version:      Intel(R) Xeon(R) CPU E5-2640 0 @ 2.50GHz CPU2 Version:      Intel(R) Xeon(R) CPU E5-2640 0 @ 2.50GHz Power redundancy configuration: 1+1 Operational power supplies:     1 Power module 1:                 OK Power module 2:                 No AC System Type:                    topic-routing Supported Blade Configuration:  Yes Disk 1:    Device Model: INTEL SSDSC2BB120G4    Serial #:     BTWL324300S7120LGN Disk 2:    Device Model: INTEL SSDSC2BB120G4    Serial #:     BTWL339609VT120LGN Fabric 1:   Slot 1/1: empty   Slot 1/2: empty   Slot 1/3: Assured Delivery Blade     Product #:          ADB-04210M-01-A     Serial #:           P004045347     Operational State:  Up     Flash Card State:   Ready     Power Module State: Ok     Mate Link Port 1:   Ok     Mate Link Port 2:   Ok     Errors:             0     Fatal errors:       0     SFP (Port 1) Details:       Media Type  :     10G Base-SR       Manufacturer:     AVAGO       Part Number :     AFBR-709SMZ       Serial #    :     AD132730182       Tx Power    :     -2.3515 dBm       Rx Power    :     -2.8083 dBm     SFP (Port 2) Details:       Media Type  :     10G Base-SR       Manufacturer:     AVAGO       Part Number :     AFBR-709SMZ       Serial #    :     AD132730179       Tx Power    :     -2.2958 dBm       Rx Power    :     -4.1352 dBm     FPGA Details:                  Bank 1     Bank 2       Build1 ID: 080102c2   080105cd     Dual Flash Card Details:       State:            Ready       Card 1 Details:         Size(MB):       7168         Manufacturer:   Virtium TuffDrive - VTDCFAPC008G-107     Rev:20130426         Serial #:       P1T11003216702260039       Card 2 Details:         Size(MB):       7168         Manufacturer:   Virtium TuffDrive - VTDCFAPC008G-107     Rev:20130426         Serial #:       P1T11003216702260088     Power Module Details:       State:                               Ok       Charge Level :                       100%       Estimated Time Until Fully Charged: 0 minutes     Mate Link Details:       CRC Errors Port 1:                   0       CRC Errors Port 2:                   0   Slot 1/4: Topic Routing Blade     Product #:          TRB-000000-02-A     Serial #:           P004044895   Slot 1/5: in use by slot 1/6   Slot 1/6: Network Acceleration Blade     Product #:          NAB-0210EM-04-A     Serial #:           P004045424     Firmware version:   7.0.0.1041     MAC Addr (1/6/1):   00:50:c2:e9:a7:6a     MAC Addr (1/6/2):   00:50:c2:e9:a7:6b SFP (1/6/1) Details:       Media Type  :     10G Base-SR       Manufacturer:     AVAGO       Part Number :     AFBR-709SMZ       Serial #    :     AD1327301GK       Tx Power    :     -2.3987 dBm       Rx Power    :     -3.0320 dBm    SFP (1/6/2) Details:       Media Type  :     10G Base-SR       Manufacturer:     AVAGO       Part Number :     AFBR-709SMZ       Serial #    :     AD1327301GV       Tx Power    :     -2.2951 dBm       Rx Power    :         -40 dBm   Slot 1/7: Host Bus Adapter Blade     Product #:          HBA-0204FC-02-A     Serial #:           GFC0749E68751     Model Name:         QLE2462     Model Description:  PCI-Express Dual Channel 4Gb Fibre Channel HBA     Driver Version:     8.04.00.03-k     Fibre-Channel 1       Operational State: Online       Link State:        Link Up - F_Port (fabric via point-to-point)       Link Speed:        4 Gbit       Port Id:           0x010a00       Port Name:         0x2100001b32070f27       Port Type:         NPort (fabric via point-to-point)       Node Name:         0x2000001b32070f27     Error Statistics:         Invalid CRC Count:                       0         Invalid Tx Words Count:                  0         Link Failure Count:                      0         Loss of Signal Count:                    0         Loss of Sync Count:                      0         Primitive Sequence Protocol Error Count: 0 ``` -------------------------------- ### Async Cache Request Example Setup Source: https://docs.solace.com/API-Developer-Online-Ref-Documentation/c/ex_2ios_2examples_2_async_cache_request_example_8m-example.html Initializes an asynchronous cache request example, setting its name, description, and required parameters like destination topic and cache name. ```objective-c #import "AsyncCacheRequestExample.h" @implementation AsyncCacheRequestExample - (id)initWithExampleInterface:(ExampleInterface *)exampleInterface { self = [super initWithExampleInterface:exampleInterface]; // Set example name and description self.name = @"AsyncCacheRequest"; self.description = @"Demonstrates how to create a cache session and send an " @"asynchronous cache request"; // Setup example parameters [self.parameters addParameter:PARAMETER_DESTINATION_TOPIC]; [self.parameters addParameter:PARAMETER_CACHE_NAME]; return self; } ``` -------------------------------- ### Hello World Publisher Example (C Intro) Source: https://docs.solace.com/API-Developer-Online-Ref-Documentation/c/ex_2ios_2examples_2_sync_cache_request_example_8m-example.html This C code snippet provides a basic 'Hello World' example for publishing messages. It serves as a fundamental starting point for using the Solace Messaging API. ```C /* * Example of Hello World publisher. */ #include #include #include #include "solclient/solclient.h" #include "solclient/solclient_log.h" #include "common.h" static void hello_world_pub_example (const char *broker_addr, const char *username, const char *password) { solClient_opaqueSession_pt session_p = SOLCLIENT_SESSION_NULL; solClient_opaqueContext_pt context_p = SOLCLIENT_CONTEXT_NULL; solClient_returnCode_t rc; /* Initialize the Solace client library. */ rc = solClient_initialize (NULL, NULL); if (rc != SOLCLIENT_OK) { fprintf (stderr, "Failed to initialize Solace client library\n"); return; } /* Create a context. */ rc = solClient_createContext (NULL, &context_p); if (rc != SOLCLIENT_OK) { fprintf (stderr, "Failed to create Solace client context\n"); solClient_cleanup (); return; } /* Create a session. */ rc = solClient_session_create (broker_addr, context_p, NULL, &session_p); if (rc != SOLCLIENT_OK) { fprintf (stderr, "Failed to create Solace client session\n"); solClient_destroyContext (context_p); solClient_cleanup (); return; } /* Connect the session. */ rc = solClient_session_connect (session_p); if (rc != SOLCLIENT_OK) { fprintf (stderr, "Failed to connect Solace client session\n"); solClient_session_destroy (session_p); solClient_destroyContext (context_p); solClient_cleanup (); return; } /* Publish a 'Hello World' message */ solClient_opaqueMsg_pt msg_p; rc = solClient_msg_alloc (&msg_p); if (rc != SOLCLIENT_OK) { fprintf (stderr, "Failed to allocate message\n"); } else { solClient_msg_setTopic (msg_p, "hello/world"); solClient_msg_setText (msg_p, "Hello World from C!"); rc = solClient_sendMsg (session_p, msg_p, SOLCLIENT_PROPERTIES_PERSISTENT_DELIVERY, NULL, NULL); if (rc != SOLCLIENT_OK) { fprintf (stderr, "Failed to send message\n"); } else { printf ("Message sent successfully.\n"); } solClient_msg_free (&msg_p); } /* Disconnect the session. */ rc = solClient_session_disconnect (session_p); if (rc != SOLCLIENT_OK) { fprintf (stderr, "Failed to disconnect Solace client session\n"); } /* Destroy the session. */ rc = solClient_session_destroy (session_p); if (rc != SOLCLIENT_OK) { fprintf (stderr, "Failed to destroy Solace client session\n"); } /* Destroy the context. */ rc = solClient_destroyContext (context_p); if (rc != SOLCLIENT_OK) { fprintf (stderr, "Failed to destroy Solace client context\n"); } /* Cleanup the Solace client library. */ solClient_cleanup (); } int main (int argc, char **argv) { hello_world_pub_example (argv[1], argv[2], argv[3]); return 0; } ``` -------------------------------- ### Hello World Publisher Example (iOS Intro) Source: https://docs.solace.com/API-Developer-Online-Ref-Documentation/c/ex_2ios_2examples_2_sync_cache_request_example_8m-example.html A basic 'Hello World' example for publishing messages using the Solace Messaging API for C in an iOS application. This serves as a starting point for understanding basic publishing. ```Objective-C #import "HelloWorldPubExample.h" @implementation HelloWorldPubExample - (void)viewDidLoad { [super viewDidLoad]; // Basic setup for publishing a 'Hello World' message } @end ``` -------------------------------- ### Simple Flow to Queue Example Source: https://docs.solace.com/API-Developer-Online-Ref-Documentation/c/examples.html Demonstrates setting up a simple flow to a queue. ```c /* ex/simpleFlowToQueue.c */ #include #include #include #include // ... (rest of the code for simpleFlowToQueue.c) ``` -------------------------------- ### Start Micro-Integration with Help Option Source: https://docs.solace.com/Micro-Integrations/Self-Managed/Connectors-Get-Started.htm Command to display help information for the start script. ```bash ./bin/start.sh -h ``` -------------------------------- ### Example: Creating and Starting a PersistentMessagePublisher Source: https://docs.solace.com/API/API-Developer-Guide-Java/Java-PM-Publish.htm An example demonstrating how to create, configure, and start a PersistentMessagePublisher using the builder pattern. ```java final PersistentMessagePublisher publisher = messagingService.createPersistentMessagePublisherBuilder() .build() // Builds a PersistentMessagePublisher object based on the provided configuration. .start(); // Causes the service to resume regular duties. Before this method is called, the service is considered off-duty. ``` -------------------------------- ### Example: Asynchronous Start with Completion Listener Source: https://docs.solace.com/API/API-Developer-Guide-Java/Java-PM-Publish.htm An example showing how to start a PersistentMessagePublisher asynchronously and handle the result using a CompletionListener. ```java final CompletionListener receiverStartupListener = (receiver, throwable) -> { if (throwable == null) { // Started successfully, can receive messages. } else { // Deal with an exception during start. } }; receiverToBeStarted.startAsync(receiverStartupListener); ``` -------------------------------- ### Get Replay Start Location Source: https://docs.solace.com/API-Developer-Online-Ref-Documentation/java/com/solacesystems/jcsmp/ConsumerFlowProperties.html Gets the message replay start location, or null if it is not set. This indicates where message replay should begin. ```java public ReplayStartLocation getReplayStartLocation() ``` -------------------------------- ### Initial Setup Command Source: https://docs.solace.com/Admin/Solace-CLI/cli-quick-reference.htm The 'setup' command is used for the first-time configuration of an appliance event broker, including setting the hostname, interfaces, clock, and time zone. ```bash setup ``` -------------------------------- ### Start Docker Container Source: https://docs.solace.com/Software-Broker/SW-Broker-Upgrade/Docker-Upgrade-Current-Release.htm Start the newly created Solace Docker container. ```bash [sysadmin@solace ~]$ **docker start solace** ``` -------------------------------- ### Run HelloWorld Example from CLI Source: https://docs.solace.com/API/API-Developer-Guide-Java/Java-API-samples.htm Execute the HelloWorld Java sample from the command line, providing required parameters such as host/port, VPN, username, and password. ```bash C:\Solly\JavaRepository\solace-samples-java-main\build\staged\bin> HelloWorld HelloWorld host:port message-vpn client-username password ``` -------------------------------- ### iOS Semp Get Over MB Example Implementation Source: https://docs.solace.com/API-Developer-Online-Ref-Documentation/c/examples.html Implementation file for an iOS example demonstrating SEMP GET operations over Message Bus. ```objective-c /* ex/ios/examples/SempGetOverMbExample.m */ #import "SempGetOverMbExample.h" // ... (rest of the code for SempGetOverMbExample.m) ``` -------------------------------- ### Solace Configuration File Example Source: https://docs.solace.com/Software-Broker/SW-Broker-Set-Up/Containers/Deploying-Container-in-Production.htm This example configuration file sets essential parameters for the Solace container, including common arguments, container name, resource limits for CPUs and memory, shared memory size, and ulimits. Ensure these are adjusted based on your system's resource calculator. ```shell #Solace Configuration ############################################################## # #. Required to be modified # ############################################################## PSP_COMMON_ARGS=--cidfile=%t/%N.cid --replace --rm --log-driver passthrough --runtime /usr/bin/crun --cgroups=split --sdnotify=conmon -d #Name of the container instance PSP_NAME=--name=solace #Specify resource limits for the container; #these are output from System Resource Calculator PSP_CPUS=--cpus=2 #or cpusets #PSP_MEMORY=--memory=6g #not required if the only container running on the host #--shm-size must be specified; output from System Resource Calculator PSP_SHM_SIZE=--shm_size=1g #ulimits set limits on other types of OS resources #removes the limit on the size of core files #nofile limits the number of files the container can have open ``` -------------------------------- ### Example: Install Solace JMS API pom.xml Locally Source: https://docs.solace.com/API/Solace-JMS-API/Building-JMS-Projects-With-Maven.htm Example of installing a Solace JMS API pom.xml file into a local Maven repository. ```bash $ mvn install:install-file -Dfile=/downloads/sol-jms/lib/solsuite-10.x.x.pom \   -DpomFile=/downloads/sol-jms/lib/solsuite-10.x.x.pom \   -Dmaven.repo.local=./.repository ``` -------------------------------- ### Hello World Publisher Example (Intro) Source: https://docs.solace.com/API-Developer-Online-Ref-Documentation/c/examples.html A basic 'Hello World' publisher example. ```c /* Intro/HelloWorldPub.c */ #include #include #include #include // ... (rest of the code for HelloWorldPub.c) ``` -------------------------------- ### Example: Configure API Key Protected Request Header Source: https://docs.solace.com/Services/Managing-RDPs.htm This example demonstrates creating and setting a protected request header for an API key, commonly used for cloud service authentication. ```bash solace(...est/rest-delivery-point/queue-binding)# create protected-request-header X-API-KEY solace(...ueue-binding/protected-request-header)# header-value 0aa99f00-b752-4bb9-b549-c168ad250e76 solace(...ueue-binding/protected-request-header)# exit ``` -------------------------------- ### Enter Setup Mode Source: https://docs.solace.com/Appliance/Appliance-Set-Up/Initializing-Appliances.htm Access the setup utility to configure network parameters for the appliance event broker. This command is run from the User EXEC mode. ```cli solace> enable solace# setup ``` -------------------------------- ### iOS Semp Get Over MB Example Header Source: https://docs.solace.com/API-Developer-Online-Ref-Documentation/c/examples.html Header file for an iOS example demonstrating SEMP (Solace Element Management Protocol) GET operations over Message Bus. ```objective-c /* ex/ios/examples/SempGetOverMbExample.h */ #import // ... (rest of the code for SempGetOverMbExample.h) ``` -------------------------------- ### Docker: Run Container with Bind Mount (Windows Example) Source: https://docs.solace.com/Software-Broker/Container-Tasks/Config-Container-Storage.htm Example command to run a Solace container on Windows using a bind mount. It maps `C:\storage\data` on the host to `/var/lib/solace` inside the container. Ensure the specified host path exists and is accessible. ```bash > docker run --mount type=bind,source=C:\storage\data,target=/var/lib/solace -d -p 8080:8080 -p 55555:55555 \ --shm-size=1g --env 'username_admin_globalaccesslevel=admin' --env 'username_admin_password=admin' \ --name=solace solace-pubsub-standard: ``` -------------------------------- ### Start Solace Event Broker Container Source: https://docs.solace.com/Software-Broker/SW-Broker-Set-Up/Containers/Set-Up-Docker-Container-CentOS-Azure.htm Start the Solace event broker container using its name or ID. ```bash >sudo docker start solace ``` -------------------------------- ### Initialize HelloWorldWebPubExample Source: https://docs.solace.com/API-Developer-Online-Ref-Documentation/c/ex_2ios_2intro_2_hello_world_web_pub_example_8m-example.html Initializes the HelloWorldWebPubExample with a given ExampleInterface, setting the example name and description. This method is used to set up the example's basic properties. ```objective-c /* * This source is distributed under the terms and conditions * of any contract or contracts between Solace and you or * your company. If there are no contracts in place use of * this source is not authorized. No support is provided and * no distribution, sharing with others or re-use of this * source is authorized unless specifically stated in the * contracts referred to above. * * Copyright 2012-2025 Solace Corporation. All rights reserved. */ #import "HelloWorldWebPubExample.h" @implementation HelloWorldWebPubExample - (id)initWithExampleInterface:(ExampleInterface *)exampleInterface { self = [super initWithExampleInterface:exampleInterface]; // Set example name and description self.name = @"HelloWorldWebPub"; self.description = @"Demonstrates the basics of web messaging session " @"creation, connection and publishing direct messages to a topic"; // Set up example parameters ``` -------------------------------- ### Start Docker Event Broker Container Source: https://docs.solace.com/Software-Broker/SW-Broker-Upgrade/Docker-Upgrade-Current-Release.htm Start the newly created Docker container to run the event broker. This command brings the new instance online. ```bash [sysadmin@ solace-primary ~]$ **docker start solace** ``` -------------------------------- ### Example AWS Authentication Configuration Source: https://docs.solace.com/Services/Managing-RDPs.htm Example configuration for AWS authentication with specific credentials and region for the S3 service. ```cli solace(...ry-point/rest-consumer/authentication)# aws solace(...oint/rest-consumer/authentication/aws)# access-key-id AKIAIOSFODNN7EXAMPLE solace(...oint/rest-consumer/authentication/aws)# secret-access-key wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY solace(...oint/rest-consumer/authentication/aws)# region us-east-1 solace(...oint/rest-consumer/authentication/aws)# service s3 ``` -------------------------------- ### Docker: Run Container with Bind Mount (Mac Example) Source: https://docs.solace.com/Software-Broker/Container-Tasks/Config-Container-Storage.htm Example command to run a Solace container on Mac using a bind mount. It maps `/mnt/solace` on the host to `/var/lib/solace` inside the container. Note potential port conflicts on newer macOS versions. ```bash > docker run --mount type=bind,source=/mnt/solace,target=/var/lib/solace -d -p 8080:8080 -p 55556:55555 \ --shm-size=1g --env 'username_admin_globalaccesslevel=admin' --env 'username_admin_password=admin' \ --name=solace solace-pubsub-standard: ``` -------------------------------- ### Initialize HelloWorldPubExample Source: https://docs.solace.com/API-Developer-Online-Ref-Documentation/c/ex_2ios_2intro_2_hello_world_pub_example_8m-example.html Initializes the HelloWorldPubExample with an ExampleInterface, setting the example's name and description. It also prepares the example parameters. ```objective-c /* * This source is distributed under the terms and conditions * of any contract or contracts between Solace and you or * your company. If there are no contracts in place use of * this source is not authorized. No support is provided and * no distribution, sharing with others or re-use of this * source is authorized unless specifically stated in the * contracts referred to above. * * Copyright 2012-2025 Solace Corporation. All rights reserved. */ #import "HelloWorldPubExample.h" @implementation HelloWorldPubExample - (id)initWithExampleInterface:(ExampleInterface *)exampleInterface { self = [super initWithExampleInterface:exampleInterface]; // Set example name and description self.name = @"HelloWorldPub"; self.description = @"Demonstrates the basics of session creation, " @"connection and publishing direct messages to a topic"; // Set up example parameters ``` -------------------------------- ### Replication Router Guaranteed Requester Example Source: https://docs.solace.com/API-Developer-Online-Ref-Documentation/c/examples.html Example of a guaranteed requester in a Replication Router setup. ```c /* ex/RRGuaranteedRequester.c */ #include #include #include #include // ... (rest of the code for RRGuaranteedRequester.c) ``` -------------------------------- ### Verify New Version Source: https://docs.solace.com/Software-Broker/SW-Broker-Upgrade/Docker-Upgrade-Current-Release.htm Log into the monitoring node and execute this command to confirm that the event broker is running the newly installed version. ```bash solace-monitor> **show version** ``` -------------------------------- ### Replication Router Guaranteed Replier Example Source: https://docs.solace.com/API-Developer-Online-Ref-Documentation/c/examples.html Example of a guaranteed replier in a Replication Router setup. ```c /* ex/RRGuaranteedReplier.c */ #include #include #include #include // ... (rest of the code for RRGuaranteedReplier.c) ``` -------------------------------- ### Start Docker Service Source: https://docs.solace.com/Software-Broker/SW-Broker-Set-Up/Containers/Set-Up-Docker-Container-CentOS-Azure.htm Use this command to start the Docker service on your CentOS host. You can verify its status with the 'status' command. ```bash sudo systemctl start docker ``` ```bash sudo systemctl status docker ``` -------------------------------- ### Replication Router Direct Requester Example Source: https://docs.solace.com/API-Developer-Online-Ref-Documentation/c/examples.html Example of a direct requester in a Replication Router setup. ```c /* ex/RRDirectRequester.c */ #include #include #include #include // ... (rest of the code for RRDirectRequester.c) ``` -------------------------------- ### Main Function Structure for Replication Example Source: https://docs.solace.com/API-Developer-Online-Ref-Documentation/c/ex_2replication_8c-example.html This is the entry point of the application. It initializes command-line options, the Solace API context, and prepares for session creation. Ensure all required parameters are provided via command line. ```c /* * fn main() * param appliance_ip address The message backbone IP address. * param appliance_username The client username for a Solace appliance running SolOS-TR. * param dest_name The Topic or Queue to publish to. * param pub_mode Publish mode. One of: * persistentT: For publishing persistent messages to a Topic. * non-persistentT: For publishing non-persistent messages to a Queue. * persistentQ: For publishing persistent messages to a Queue. * non-persistentQ: For publishing non-persistent messages to a Queue. * * The entry point to the application. */ int main ( int argc, char *argv[] ) { struct commonOptions commandOpts; solClient_returnCode_t rc = SOLCLIENT_OK; solClient_opaqueContext_pt context_p; solClient_context_createFuncInfo_t contextFuncInfo = SOLCLIENT_CONTEXT_CREATEFUNC_INITIALIZER; solClient_opaqueSession_pt session_p; int loop; char binMsg[1024]; solClient_opaqueMsg_pt msg_p = NULL; solClient_destination_t destination; publisherInfoStruct_t pubInfo; printf ( "\nreplication.c (Copyright 2010-2025 Solace Corporation. All rights reserved.)\n" ); memset (&pubInfo, 0, sizeof(pubInfo)); /************************************************************************* * Parse command options *************************************************************************/ common_initCommandOptions(&commandOpts, ( USER_PARAM_MASK ), /* required parameters */ ( HOST_PARAM_MASK | PASS_PARAM_MASK | NUM_MSGS_MASK | LOG_LEVEL_MASK | USE_GSS_MASK | ZIP_LEVEL_MASK)); /* optional parameters */ if ( common_parseCommandOptions ( argc, argv, &commandOpts, NULL ) == 0 ) { exit(1); } /************************************************************************* * Initialize the API (and setup logging level) ``` -------------------------------- ### Replication Router Direct Replier Example Source: https://docs.solace.com/API-Developer-Online-Ref-Documentation/c/examples.html Example of a direct replier in a Replication Router setup. ```c /* ex/RRDirectReplier.c */ #include #include #include #include // ... (rest of the code for RRDirectReplier.c) ``` -------------------------------- ### Hello World Queue Subscriber Example (Intro) Source: https://docs.solace.com/API-Developer-Online-Ref-Documentation/c/examples.html A basic 'Hello World' subscriber example consuming from a queue. ```c /* Intro/HelloWorldQueueSub.c */ #include #include #include #include // ... (rest of the code for HelloWorldQueueSub.c) ``` -------------------------------- ### Run Container with Bind Mount Storage Source: https://docs.solace.com/Software-Broker/Container-Tasks/Config-Container-Storage.htm Start a container using Podman with a bind mount for external storage. The host directory is mapped to `/var/lib/solace` inside the container. ```bash > podman run -d -u 1000 -p 8080:8080 -p 55555:55555 \ --shm-size=1g --env 'username_admin_globalaccesslevel=admin' --env 'username_admin_password=admin' \ --mount type=bind,source=/home//storage-group,target=/var/lib/solace,relabel=private \ --name=solace docker.io/solace/solace-pubsub-standard:edge ``` -------------------------------- ### Configure Specific OAuth Client Authentication Example Source: https://docs.solace.com/Services/Managing-RDPs.htm Example of configuring OAuth client authentication with specific client ID, secret, token endpoint, and scope. This demonstrates setting up authentication for a Microsoft Azure Event Hubs endpoint. ```cli solace(...ry-point/rest-consumer/authentication)# oauth-client solace(...-consumer/authentication/oauth-client)# client-id 3d69f5d8-77c9-4f25-9d22-aad25c737aa0 solace(...-consumer/authentication/oauth-client)# client-secret vkYDeFI[gUml-tX=7=5ybBGP22fF/@5O solace(...-consumer/authentication/oauth-client)# token-endpoint https://login.microsoftonline.com/solace.com/oauth2/v2.0/token solace(...-consumer/authentication/oauth-client)# scope https://eventhubs.azure.net/.default ``` -------------------------------- ### Start Docker Service Source: https://docs.solace.com/Software-Broker/SW-Broker-Set-Up/Containers/Set-Up-Docker-Container-AMI-EC2.htm Command to start the Docker service on the EC2 instance. Ensure Docker is running before pulling images or starting containers. ```bash sudo service docker start ``` -------------------------------- ### Get Single Role Mapping Response Example Source: https://docs.solace.com/API-Developer-Online-Ref-Documentation/schema-registry/index.html This is an example of a successful response when retrieving details of a single role mapping. ```json { "principalId": "svc_account_84874587_123484", "principalName": "famartin-svc-account", "role": "READ_ONLY" } ``` -------------------------------- ### Queue Provisioning Example Source: https://docs.solace.com/API-Developer-Online-Ref-Documentation/c/examples.html Demonstrates how to provision queues using the C messaging API. ```c /* ex/queueProvision.c */ #include #include #include #include // ... (rest of the code for queueProvision.c) ``` -------------------------------- ### Main Function Setup and Initialization (C) Source: https://docs.solace.com/API-Developer-Online-Ref-Documentation/c/ex_2message_selectors_on_queue_8c-example.html The main function initializes the Solace API, sets up logging, and parses command-line options. It demonstrates the creation of a Solace context with automatic thread creation. ```c int main ( int argc, char *argv[] ) { struct commonOptions commandOpts; solClient_returnCode_t rc = SOLCLIENT_OK; solClient_opaqueContext_pt context_p; solClient_context_createFuncInfo_t contextFuncInfo = SOLCLIENT_CONTEXT_CREATEFUNC_INITIALIZER; solClient_opaqueSession_pt session_p; solClient_opaqueFlow_pt flow_p = NULL; solClient_flow_createFuncInfo_t flowFuncInfo = SOLCLIENT_FLOW_CREATEFUNC_INITIALIZER; const char *flowProps[20]; int propIndex; solClient_destination_t flowDest; printf ( "\nmessageSelectorsOnQueue.c (Copyright 2009-2025 Solace Corporation. All rights reserved.)\n" ); /************************************************************************* * Parse command options ************************************************************************* */ common_initCommandOptions(&commandOpts, ( USER_PARAM_MASK ), /* required parameters */ ( HOST_PARAM_MASK | PASS_PARAM_MASK | LOG_LEVEL_MASK | USE_GSS_MASK | ZIP_LEVEL_MASK)); /* optional parameters */ if ( common_parseCommandOptions ( argc, argv, &commandOpts, NULL ) == 0 ) { exit(1); } /************************************************************************* * Initialize API and setup logging level ************************************************************************* */ /* solClient needs to be initialized before any other API calls are made. */ if ( ( rc = solClient_initialize ( SOLCLIENT_LOG_DEFAULT_FILTER, NULL ) ) != SOLCLIENT_OK ) { common_handleError ( rc, "solClient_initialize()" ); goto notInitialized; } common_printCCSMPversion ( ); /* * Standard logging levels can be set independently for the API and the * application. In this case, the ALL category is used to set the log level * for both at the same time. */ solClient_log_setFilterLevel ( SOLCLIENT_LOG_CATEGORY_ALL, commandOpts.logLevel ); /************************************************************************* * Create a Context ************************************************************************* */ solClient_log ( SOLCLIENT_LOG_INFO, "Creating solClient context" ); /* * Create a Context, and specify that the Context thread be created * automatically instead of having the application create its own * Context thread. */ if ( ( rc = solClient_context_create ( SOLCLIENT_CONTEXT_PROPS_DEFAULT_WITH_CREATE_THREAD, &context_p, &contextFuncInfo, sizeof ( contextFuncInfo ) ) ) != SOLCLIENT_OK ) { common_handleError ( rc, "solClient_context_create()" ); ``` -------------------------------- ### Create and Start PersistentMessagePublisher (Synchronous) Source: https://docs.solace.com/API/API-Developer-Guide-Go/Go-PM-Publish.htm Use PersistentMessagePublisherBuilder to create and configure a PersistentMessagePublisher. Call Build() to get the publisher instance and Start() to make it operational. The publisher is off-duty before Start() is called. ```Go /* Creates an instance of PersistentMessagePublisherBuilder, which is used to create PersistentMessagePublishers. */ persistentPublisher, builderError := messagingService. CreatePersistentMessagePublisherBuilder(). // Creates a PersistentMessagePublisherBuilder that can be used to configure persistent message publisher instances. Build() // Creates a new PersistentMessagePublisher instance based on the configured properties. if builderErr != nil { panic(builderErr) } startErr := persistentPublisher.Start() // Start starts the publisher synchronously. Before this function is called, the publisher is considered off-duty. if startErr != nil { panic(startErr) } ``` -------------------------------- ### Simple Flow to Topic Example Source: https://docs.solace.com/API-Developer-Online-Ref-Documentation/c/examples.html Demonstrates setting up a simple flow to a topic. ```c /* ex/simpleFlowToTopic.c */ #include #include #include #include // ... (rest of the code for simpleFlowToTopic.c) ``` -------------------------------- ### SEMP Get Over Message Bus Example Source: https://docs.solace.com/API-Developer-Online-Ref-Documentation/c/examples.html Demonstrates using SEMP (Solace Element Management Protocol) GET operations over the Message Bus. ```c /* ex/sempGetOverMb.c */ #include #include #include #include // ... (rest of the code for sempGetOverMb.c) ``` -------------------------------- ### Basic Host Entry Examples Source: https://docs.solace.com/API-Developer-Online-Ref-Documentation/c/index.html These examples demonstrate basic configurations for the SOLCLIENT_SESSION_PROP_HOST property, specifying protocol, host, and port. ```text 192.168.160.28 ``` ```text [fe80::1] ``` ```text tcp:192.168.160.28 ``` ```text tcps:192.168.160.28 ``` ```text tcps:[fe80::1] ``` ```text tcp:192.168.160.28:44444 ``` ```text tcp:[fe80::1]:44444 ``` ```text http ://192.168.160.28 ``` ```text https ://192.168.160.28 ``` -------------------------------- ### Get Application ID Example Source: https://docs.solace.com/Cloud/Event-Portal/event-portal-cicd.htm This JSON response shows an example of the data returned when fetching application details, including the application ID. ```json { "data": [ { "id": "zxc3v45b6n", "name": "MyApp", "applicationDomainId": "a2sdf34ghj", ... } ] } ``` -------------------------------- ### Main Function for Direct Replier Setup Source: https://docs.solace.com/API-Developer-Online-Ref-Documentation/c/ex_2_r_r_direct_replier_8c-example.html This is the entry point of the application. It initializes signal handling, parses command-line options, and sets up the Solace API context and session for receiving direct messages. ```c int main ( int argc, char *argv[] ) { struct commonOptions commandOpts; solClient_returnCode_t rc = SOLCLIENT_OK; /***********Context-related variable definitions*********/ solClient_opaqueContext_pt context_p; solClient_context_createFuncInfo_t contextFuncInfo = SOLCLIENT_CONTEXT_CREATEFUNC_INITIALIZER; /***********Session-related variable definitions*********/ solClient_opaqueSession_pt session_p; solClient_session_createFuncInfo_t sessionFuncInfo = SOLCLIENT_SESSION_CREATEFUNC_INITIALIZER; const char *sessionProps[50]; int propIndex = 0; printf ( "\nRRDirectReplier.c (Copyright 2013-2025 Solace Corporation. All rights reserved.)\n" ); /* Intialize Control C handling */ initSigHandler ( ); /************************************************************************* * Parse command options *************************************************************************/ common_initCommandOptions(&commandOpts, ( USER_PARAM_MASK | DEST_PARAM_MASK ), /* required parameters */ ( HOST_PARAM_MASK | PASS_PARAM_MASK | LOG_LEVEL_MASK | USE_GSS_MASK | ZIP_LEVEL_MASK)); /* optional parameters */ if ( common_parseCommandOptions ( argc, argv, &commandOpts, NULL ) == 0 ) { exit (1); } /************************************************************************* * Initialize the API and setup logging level *************************************************************************/ ``` -------------------------------- ### Start PersistentMessagePublisher Asynchronously with Callback Source: https://docs.solace.com/API/API-Developer-Guide-Java/Java-PM-Publish.htm This example shows how to start a persistent message publisher asynchronously using `startAsync()`. A `CompletionListener` is provided to handle notifications after the start operation completes, including any potential exceptions. ```Java final CompletionListener receiverStartupListener = (receiver, throwable) -> { if (throwable == null) { // Started successfully, can receive messages. } else { // Deal with an exception during start. } }; receiverToBeStarted.startAsync(receiverStartupListener); ``` -------------------------------- ### Enable REST Consumer Source: https://docs.solace.com/Services/Managing-RDPs.htm Start a REST consumer to allow message delivery and connection initiation. This command brings the consumer out of the shutdown state. ```cli solace(...est/rest-delivery-point/rest-consumer)# no shutdown ``` -------------------------------- ### Start DirectMessageReceiver Asynchronously with Callback Source: https://docs.solace.com/API/API-Developer-Guide-Java/Java-DM-Subscribe.htm This example demonstrates how to start a DirectMessageReceiver asynchronously using a CompletionListener to handle the startup result. This is useful for non-blocking operations. ```java final CompletionListener receiverStartupListener = (receiver, throwable) -> { if (throwable == null) { // Started successfully, can receive messages. } else { // Deal with an exception during start. } }; receiverToBeStarted.startAsync(receiverStartupListener); ``` -------------------------------- ### Show Hardware Details Output Example Source: https://docs.solace.com/Messaging/Guaranteed-Msg/Replacing-LUNs-and-Migrating.htm Example output of the 'show hardware details' command, displaying LUN information including state, size, and WWN. ```text solace-primary> show hardware details . . . Slot 1/4: Host Bus Adapter Blade Product #: HBA-0204FC-02-A Serial #: RFC0609G02361 Model Name: QLE2462 Model Description: PCI-Express Dual Channel 4Gb Fibre Channel HBA Driver Version: 8.04.00.03-k . . . Attached devices LUN 0 State: Ready Size: 300G WWN : 60:06:01:60:4d:30:1c:00:8e:29:1b:b6:a6:d6:e8:11 LUN 1 State: Ready Size: 800G WWN : 60:01:40:57:d2:4f:4b:77:68:14:35:fa:f6:84:d5:87 ``` -------------------------------- ### Pass Configuration Keys with Docker/Podman Create Command Source: https://docs.solace.com/Software-Broker/Container-Tasks/Config-SW-Broker-Container-Cfg-Keys.htm When creating a container with Docker or Podman, use the `--env` parameter to pass configuration keys. This example sets the username, global access level, and password for the 'admin' user. ```bash --env 'username_admin_globalaccesslevel=admin' --env 'username_admin_password=admin' ``` -------------------------------- ### HelloWorldSubExample Header Source: https://docs.solace.com/API-Developer-Online-Ref-Documentation/c/ex_2ios_2intro_2_hello_world_sub_example_8h-example.html Defines the HelloWorldSubExample class, inheriting from the base Example class, and declares a message counter property. This is a basic setup for a subscriber example. ```objective-c #import "Example.h" @interface HelloWorldSubExample : Example @property int msgCount; @end ``` -------------------------------- ### Run Solace Event Broker Container Source: https://docs.solace.com/Software-Broker/SW-Broker-Set-Up/Containers/Set-Up-Podman-Container-Ubuntu.htm Start a Solace Software Event Broker container with specified ports, environment variables for admin credentials, network settings, and a bind mount for storage. Adjust `--shm-size` and source path as needed. ```bash podman run -d -u 1000 -p 8080:8080 -p 55555:55555 --shm-size=1g \ --env username_admin_globalaccesslevel=admin \ --env username_admin_password=admin --name=solace \ --net slirp4netns:port_handler=slirp4netns \ --mount type=bind,source=/home//storage-group,destination=/var/lib/solace,relabel=private,ro=false \ docker.io/solace/solace-pubsub-standard:edge ``` -------------------------------- ### getReplayStartLocation() Source: https://docs.solace.com/API-Developer-Online-Ref-Documentation/java/index-all.html Gets the message replay start location, or null if it is not set. ```APIDOC ## getReplayStartLocation() ### Description Gets the message replay start location, or null if it is not set. ### Method Signature `getReplayStartLocation() - Method in class com.solacesystems.jcsmp.ConsumerFlowProperties` ``` -------------------------------- ### SEMP v1 Show Client Command Example Source: https://docs.solace.com/Admin/SEMP/Using-Legacy-SEMP.htm This is an example of a SEMP v1 command to show all clients. White space is optional in SEMP v1 commands. ```xml * ``` -------------------------------- ### Example: Configure Queue with Physical Name Source: https://docs.solace.com/API/Solace-JMS-API/Configuring-JNDI-Objects.htm Demonstrates creating a queue and setting its physical name. ```cli solace(configure)# jndi message-vpn blue solace(configure/jndi)# create queue q/market/orders solace(configure/jndi/queue)# property physical-name orders solace(configure/jndi/queue)# exit solace(configure/jndi)# create queue q/market/news solace(configure/jndi/queue)# property physical-name news solace(configure/jndi/queue)# end solace# ``` -------------------------------- ### Start DirectMessageReceivers Asynchronously Source: https://docs.solace.com/API/API-Developer-Guide-Python/Python-DM-Receive.htm This example demonstrates starting multiple DirectMessageReceivers asynchronously using callbacks for non-blocking notifications. It utilizes concurrent.futures for managing asynchronous operations. ```python import concurrent.futures # ... receivers = [direct_message_receiver_builder.build() for _ in range(10)] futures_to_receiver = { receiver.start_async() : receiver for receiver in receivers} for future in concurrent.futures.as_completed(futures_to_receiver): receiver = futures_to_receiver[future] try: # start async has no return but will raise an on start failure future.result() print(f'Receiver{id(receiver)} started successfully') except Exception as err: print(f'Receiver{id(receiver)} generated an error: {err}') ``` -------------------------------- ### Start Message Spool Service Source: https://docs.solace.com/Appliance/Hardware-Maintenance-Tasks/Replacing-ADBs.htm Command sequence to enable and start the primary message spool service after the new ADB has been installed and the supercapacitor is charged. ```solace cli solace> enable solace# configure solace(configure)# hardware message-spool solace(configure/hardware/message-spool)# no shutdown primary solace(configure/hardware/message-spool)# exit ```