Cloud Messaging

Implement the messaging functionality by bringing the JMS-based messaging capabilities. Publish messages and subscribe to those messages with ease.

Overview

Messaging is one of the integration patterns used by the enterprise applications to solve integration challenges. Messaging systems allow independent applications to work together to accomplish some common tasks by means of exchanging messages without requiring direct connections. Messaging is also known as message-oriented middleware (MOM), as it allows software components that were developed independently and ran on different networks to interact with each other.

MOM uses a messaging provider to support messaging operations. MOM systems are composed of three basic components: clients, messages, and a MOM provider, including an API and administrative tools. The messaging provider uses different architectures to route and deliver messages such as, a centralized message server, distributed routing and delivery mechanism to each client machine, or a combination of both approaches. The basic process of message exchange is as follows:

  1. A client sends a message using an API call to a destination managed by a MOM system.

  2. The provider routes and delivers the message.

  3. The provider possesses the message until the receiving client retrieves it, so the client can continue doing other work after sending the message.

By using a message-based model and a provider, you can create a loosely coupled system. It runs reliably, without interruption, even if a component or connection fails.

Note: Messaging is not available by default for a tenant. To enable this functionality, contact Software AG Global Support.

Terminology

Messaging Workflow in webMethods.io Integration

The webMethods.io Integration messaging solution allows you to implement the send-receive (publish-subscribe) or point-to-point messaging styles by bringing the JMS-based messaging capabilities . It provides the infrastructure for implementing synchronous message-based solutions that are built on the publish-and-subscribe model. The message exchange process in webMethods.io Integration is as follows:

  1. The publisher publishes events received from the external applications to a destination (queue or topic) specified in the publisher’s Workflow or FlowService using the Messaging connector.

  2. The messaging provider sends the messages to the registered subscribers.

  3. The subscriber evaluates the messages in accordance to the routing rules defined. If no rule satisfies the criteria, the default invocation is initiated. If default invocation is not specified, then the subscriber acknowledges the message and no invocation happens.

  4. The initiated Workflow or FlowService performs the subsequent tasks as configured in webMethods.io Integration.

The messaging provider delivers messages in the order they are received. In addition, it ensures a consumer always processes messages in the same order as they are received. The messaging provider can hold up to 10000 messages per queue or topic. All messages arriving at the destinations are dropped if the hold capacity limit is reached, until the number of messages waiting to be delivered decreases. The dropped messages cannot be recovered. Consumed messages are immediately removed from a queue or a topic, and are no longer available for consumption by any other subscriber. If there are no subscribers, based on the destination type, the message retention is as follows:

Note: Messaging is available for all projects in a tenant after it is enabled for that tenant, but you cannot refer to queues or topics created under a project from other projects.

High-level Tasks for Configuring Messaging

Task Description
Enable the messaging functionality Contact Global Support to enable the messaging functionality for your tenant in webMethods.io Integration.
Create a destination Set up a topic or queue to receive messages from publishers and store them until a subscriber consumes them.
Create a publisher FlowService or WorkFlow Create a FlowService or Workflow to publish messages to a queue or topic using the Messaging Service connector. The input data to the publisher FlowService or Workflow can be a string or a document that is received from other applications.
Create a subscriber Create a subscriber to perform the following tasks:
  • Subscribe (listen) for messages received by a queue or topic.
  • Define message routes.
  • Define default invocation.
Create an invocation FlowService or WorkFlow Create a FlowService or Workflow to consume messages from a queue or topic. The consumer is associated with a subscriber and runs when a queue or topic receives messages.

See the examples that follow to create and configure messaging components.

Metrics Associated with Queues and Topics

After you create a queue or a topic, the metrics available for a queue or a topic appear when you click the queue or the topic link to view the details.



Subscribers

A subscriber receives messages published by a publisher. To receive published messages, you must create a subscription to that destination. After a subscription is created, a subscriber can view only messages published to the destination. As soon as a subscription receives an incoming message, it invokes a Workflow or FlowService defined in the subscription.

Message Routing in Subscribers

The Message Routing feature enables you to define one or more routing rules for messages within a subscriber. Setting routing rules allow you to define the actions that must be taken after receiving a message without requiring manual intervention.

A routing rule consists of two parts: an expression that specifies when the rule is applicable, and an action that must be completed. These processes can perform any processing, including extraction of the message and integration with back-end systems or a notification action. For example, a routing rule may initiate a business process that sends an alert notification to an administrator whenever a customer feedback message arrives in the mailbox.

Upon receiving a message, webMethods.io Integration evaluates each routing rule. When the rule criteria match, the application initiates the business processes (invokes target) that is configured in the rule. If none of the rules satisfy the criteria, the application initiates the business process specified in Default invocation.

webMethods.io Integration evaluates the routing rules in the same order in which the rules appear in the editor. It is possible that a message could satisfy more than one routing rule. However, webMethods.io Integration runs only the Workflow or FlowService associated with the first satisfied routing rule and ignores the remaining routing rules. Therefore, the order in which you list routing rules on the editor is important.

For example, to process a purchase order, you might create services that:

  1. adds a new customer record to a database.
  2. adds a customer order.
  3. bills the customer.

The service that adds a customer order can only run successfully if the new customer record has been added to the database. Likewise, the service that bills the customer can only run successfully if the order has been added. You can ensure that the services run in the necessary order by creating a subscriber that contains one routing rule for each expected message.

Subscriber Workflow

Creating Subscribers

You can create subscribers in one of the following ways:

Creating Subscribers through Messaging

  1. Go to Messaging > Subscribers. The Subscribers page appears.

  2. Click Add Subscriber. The New Subscriber page appears.

  3. Enter the following details:

    1. Name - Name of the subscriber.

    2. Description - Short explanation about the subscriber.

    3. Destination:

      a. Destination type - Type of destination, either Queue or Topic.

      b. Select destination - Name of the destination.

    4. Default invocation:

      a. Invocation type - Type of invocation, either Workflow or FlowService.

      b. Select invocation - Name of the invocation. Alternatively, you can add a new invocation by clicking .

      Note: For subscribers created prior to version 10.11, the Invocation type and Invocation name fields are grouped and named as Default invocation. Thus, the existing Invocation section is known as Default invocation.

  4. Do the following to add routing rules:

    1. Click Add routing rule. The New routing rule page appears.

    2. Enter the following details:

      a. Name - Name for the routing rule. This name must be unique for each routing rule. It is used to identify the routing rule in other parts of the application.

      b. Filter - Expression that must be evaluated before running the invocation; can be empty for default routing rule.

      c. Invocation type - Type of the invocation (Workflow or a FlowService) that must be invoked when a message arrives.

      d. Select Invocation- Name of the invocation that must be invoked. You can create a new invocation if none of the existing ones suffice by clicking .

      e. Click Add. The newly added rule appears under Routing rules.

      f. Repeat the sub steps in this step to add more routing rules.

      Tips:

      • You can edit or delete a routing rule by clicking the Edit or Delete buttons near the rule in the Subscriber details page.

      • Reordering Routing Rules: webMethods.io Integration evaluates the routing rules in the same order in which the rules appear under Routing rules. However, you can reorder the rules as per your requirement by performing the following steps in the Subscriber details page:

        a. Select a routing rule.

        b. Move the selected rule up or down the list to the desired position.

  5. Click Save. The subscriber details appear.

    Notes:

    • You can edit or delete a subscriber by clicking the Edit or Delete buttons near the subscriber from the Subscribers page. Alternatively, you can click the Edit button from the Subscriber details page to edit a subscriber.

    • All the routing rules defined for a subscriber (either from Workflow or Subscriber) are listed in the respective Subscriber details page under the Routing rules section. If you modify any existing values or add more routing rules to a subscriber from the Subscribers page, the corresponding Workflow trigger is automatically updated with these changes. The newly added routing rules are listed under Filters for a Workflow trigger. Similarly, if you modify any values or add more filters to a Workflow trigger, then those details are automatically updated and listed in the Subscriber details page. Hence, the message evaluation might not always follows the order in which the rules are listed for a subscriber.

Creating Subscribers through Workflows

  1. Go to Integrations > Workflows. The Workflows page appears.

  2. Click Add. The Start Building your Workflow page appears.

  3. Click Create New Workflow to start creating a Workflow. The Workflow canvas appears.

  4. Click the Settings icon on the Start step . The Trigger page appears.

  5. Search and select the Messaging Service trigger.

    Note: Version: 1 Messaging Service triggers cannot be modified.

  6. Click Next. The Messaging Service page appears.

  7. Perform the following steps to add a subscriber:

    1. Click . The Add subscriber page appears.

    2. Enter the following details:

      a. Subscriber Name - Name of the subscriber.

      b. Description - Short explanation about the subscriber.

      c. Destination type- Type of destination, either Queue or Topic.

      d. Destination - Name of the destination.

    3. Click Save. The subscriber is created.

  8. Perform the following to add filters:

    1. Click Add Filters. The filter fields appear.

    2. Enter the following details:

      a. Name - Name for the routing rule. This name must be unique for each routing rule. It is used to identify the routing rule in other parts of the application.

      b. Filter Expression - Expression that must be evaluated before running the invocation; can be empty for default routing rule.

    3. Repeat the sub steps in this step to add more filters.

  9. Click Save. The Test trigger page appears.

    Note: If you want to test the trigger for a subscriber, you must first publish a message and then click the Test button to see whether the message is received.

  10. Click Skip. The Trigger output datapage appears.

  11. Click Done. The Workflow canvas appears.

  12. Drag and drop the Logger connector on to the canvas from the Search pane.

  13. Click the warning icon on the Logger. The Logger page appears.

  14. Click Next. The Logger connector fields appear.

  15. Drag and drop string to the Log Data field.

  16. Click Next. The Test this action page appears.

  17. Click Done. The Workflow canvas appears.

  18. Connect Logger to the Stop step.

  19. Provide a name and description for the Workflow.

  20. Save the Workflow. Now the Workflow is ready to receive messages and process further steps based on the filters specified.

    Notes:

    • You can edit a subscriber’s filters by clicking the Edit button of the Messaging Service trigger from a Workflow.

    • If a Workflow is associated with only one subscriber and you have deleted the trigger, then the subscriber is also deleted.

Manage Subscriber State

The state of a subscriber indicates whether a subscriber is active or inactive. webMethods.io Integration allows you to view, change, and manage the state of a subscriber.

The states that can be set for a subscriber are: Enable, Disable, and Suspend. You may want to change the state of a subscriber in the following scenarios:

You can view the current state of a subscriber by going to the Subscribers page in Messaging.

Alternatively, you can view the subscriber state by going to the details page of a particular subscriber.

Subscriber State Behavior

Subscriber State Behavior
Enabled The subscriber is active and can receive and process messages.
Disabled The subscriber is unavailable and cannot receive and process any message.
Note: Subscribers that are Disabled can be enabled only using the user interface.
Suspended The subscriber is partially available. This means, the subscriber can process only existing messages but cannot receive any new messages.
Note: Subscribers can enter the Suspended state due to one of the two reasons:
  • A user has suspended a subscriber explicitly using the user interface.
  • The system suspends a subscriber for reasons like message processing error, server overload, and back-end system failure. In such cases, the subscriber is automatically enabled after the cause is addressed.
  • Not Configured The subscriber is not configured during a Workflow creation and is marked with an orange warning icon. You can configure the subscriber using the Edit option either from the Subscribers page or from the corresponding Workflow.

    Changing Subscriber State

    1. Go to Messaging > Subscribers. The Subscribers page appears listing all existing subscribers. If subscribers are not yet created, you does not see the list.

    2. Click on the vertical ellipsis icon given against the subscriber.

    3. Select the state you want to set for the subscriber from the list of options that appear. When you change the state of a subscriber, webMethods.io Integration takes some time to update the change. During this time, new messages are retrieved and processed.

      Notes:

      • When you disable an enabled subscriber, webMethods.io Integration checks for existing and new messages. The existing messages that are currently being processed are allowed to complete, whereas messages that are awaiting to be processed are dropped and cannot be retrieved again. New messages are not fetched.
      • When you suspend an enabled subscriber, webMethods.io Integration allows existing messages that are currently being processed and messages that are awaiting to be processed to continue their normal course of execution. New messages are not fetched.
      • If you disable an enabled subscriber that is associated with a queue, webMethods.io Integration allows you to create a new subscriber on the same queue. This means, you can have only one active subscriber for a queue but can have multiple disabled subscribers for the same queue.
      • If you want to enable a disabled subscriber that is associated with a queue, ensure that the queue is not associated with any other active subscriber. This is because there can only be one active subscriber for a queue.
      • You cannot suspend a disabled subscriber directly. If you want to suspend a disabled subscriber, you must enable it and suspend.

    Tips:

    Publish and Subscribe Messages using FlowServices

    Summary

    To publish and subscribe messages using queues and FlowServices. In this example, we will do the following high-level tasks:

    1. Create Queue - Create a queue Q1 to store messages received from publisher.

    2. Create Publisher - Create a FlowService, say Q1_publish_flowservice, to publish the messages to Q1.

    3. Create Subscriber - Create a subscriber, say Q1_subscriber, which subscribes to Q1 and runs a FlowService, Q1_consume_flowservice, to consume the messages.

    4. Publish Messages - Run the publisher and view the consumer FlowService execution logs.

    Basic Flow

    Create Queue

    1. Log in to webMethods.io Integration and create a project, for example, Messaging_Ops. You can also select an existing project.

    2. Go to Messaging. The Messaging - Queues page appears.

    3. Click Add Queue. The New Queue page appears.

    4. Enter the queue name as Q1.

    5. Click Save. The newly created queue details appear.

    Create Publisher

    1. Click Integrations > FlowServices. The FlowServices page appears.

    2. Click . The Start creating the FlowService page appears.

    3. Enter the FlowService name as Q1_publisher_flowservice.

    4. [Optional] Enter a short description of the FlowService under FlowService name.

    5. Type Messaging in the FlowService step1 and select Messaging from the list that appears. The fields associated with the Messaging application appears.

    6. Select the following options:

      a. Action - publish

      b. Destination type - Queue

      c. Destination - Q1

      Note: You can also add a new destination by clicking the Add Destination option.

      d. Account - Default account

    7. Click to map the input and output fields. The Pipeline panel appears.

    8. Double-click on the string field. The Set Value page appears.

    9. Enter the message I want to publish a message!.

    10. Click Save. The Pipeline panel appears.

    11. Close the Pipeline panel. The FlowService page appears.

    12. Click Save. The FlowService is ready to publish messages.

    Create Subscriber

    You can create the consumer FlowService in one of the following ways:

    Here, the steps are explained to create Q1_subscriber containing Q1_consume_flowservice from the Subscribers page.

    1. Go to Messaging > Subscribers. The Subscribers page appears.

    2. Click Add Subscriber. The New subscriber page appears.

    3. Enter the following details:

      a. Subscriber Name - Q1_subscriber

      b. Description - Consumes messages from Q1

      c. Destination type- Queue

      d. Select destination- Q1

    4. Perform the following to set the Default invocation:

      a. Invocation type - FlowService

      b. Select invocation - Click and enter the name as Q1_consumer_flowservice in the New FlowService page.

      c. Click Save.

    5. Perform the following to add routing rules:

      a. Click Add routing rules. The New routing rule page appears.

      b. Enter the following details:

      i. Name - Rule 1

      ii. Filter - %body/string%==”Hello”

      iii. Invocation type - FlowService

      iv. Select Invocation - Click and enter the name as Rule1_invocation_flowservice in the New FlowService page.

      v. Click Save. The selected FlowService is added and is invoked if the incoming message criteria is satisfied.

      Note: You can choose an existing FlowService too. Only FlowServices that have JMS trigger specifications are listed in the Select Invocation field.

      c. Click Add. The new rule is created and listed under Routing rules.

      d. Repeat the sub steps in this step to add more rules if required.

    6. Click Save. The FlowService is added to the subscriber and the Subscriber details page appears.

      Note: Further, as you have created the consumer FlowService from the Subscribers page, the trigger specification reference appears automatically.

    7. Click Save. The subscriber is created with the Q1_consumer_flowservice that consumes messages arriving in Q1.

    Publish Messages

    1. Open the Q1_publisher_flowservice.

    2. Click . If the Q1_publisher_flowservice runs successfully, the Q1_consumer_flowservice runs automatically. The Q1_publisher_flowservice sends the message to the queue Q1 and as the Q1_Subscriber is listening to Q1, it runs the Q1_consumer_flowservice created in the Q1_Subscriber.

    3. Go to Monitor > Execution results > FlowService execution. The FlowService execution statistics appear.

    4. Go to the Executions section. You can observe that the Execution source column for the:

      • Q1_consumer_flowService is Messaging Subscriber.

      • Q1_publisher_flowService is User Interface.

    In this way, you can publish and subscribe messages using FlowServices.

    Publish and Subscribe Messages Using Workflows

    Summary

    To publish and subscribe messages using topic and Workflows. In this example, we will do the following high-level tasks:

    1. Create Publisher - Create a Workflow, say T1_publish_workflow, to publish the messages to topic T1.

    2. Create Subscriber - Create a Subscriber, say T1_subscriber, which subscribes to T1 and runs a Workflow, T1_subscriber_workflow, to consume the messages.

    3. Publish Messages - Run the publisher and view the consumer Workflow execution logs.

    Basic Flow

    Create Publisher

    1. Log in to webMethods.io Integration and create a project, for example, Messaging_Ops. You can also select an existing project.

    2. Click Integrations > Workflows. The Workflows page appears.

    3. Click . The Start Building your Workflow page appears.

    4. Click Create New Workflow to start creating a Workflow to publish the message. The Workflow canvas appears.

    5. Drag and drop the Messaging connector on to the canvas from the right-side Search pane.

    6. Click the warning icon on the Messaging connector. The Messaging page appears.

    7. Provide the following details to configure the Messaging connector:

      a. Select action - publish

      b. Name - T1_publisher

      c. Destination Type - Topic

      d. Destination - T1 (You can also add a new destination by clicking )

      e. Connect to Messaging - DefaultAccount

      f. Click Next. The T1_publisher page appears.

      g. Type the message, Hello! I’m publishing a message, in the string field.

      h. Click Next. The Test this action page appears.

      i. Click Test. The Output tab shows that the message has been posted.

      j. Click Done. The Workflow canvas page appears.

    8. Connect the Messaging step to the Stop button.

    9. Provide a name for the Workflow, T1_publisher_workflow.

    10. Click Done. The Workflow name is updated.

    11. Save the Workflow.

    Create Subscriber

    1. Click Integrations > Workflows. The Workflows page appears.

    2. Click . The Start Building your Workflow page appears.

    3. Click Create New Workflow to start creating a Workflow for subscribing messages. The Workflow canvas appears.

    4. Click the Settings icon on the Start step . The Trigger page appears.

    5. Search and select the Messaging Service trigger.

    6. Click Next. The Messaging Service page appears.

    7. Perform the following steps to add a subscriber:

      a. Click . The Add subscriber page appears.

      b. Subscriber Name - T1_subscriber

      c. Description - Consumes messages received from T1

      d. Destination type - Topic

      e. Destination - T1

      f. Click Save. The subscriber is created.

    8. Perform the following to add filters:

      a. Click Add Filters. The filter fields appear.

      b. Enter the following details:

      i. Name - F1.

      ii. Filter Expression - %body/string%==”Hello”.

      iii. Repeat the previous two steps to add more filters.

    9. Click Save. The Test trigger page appears.

      Note: If you want to test the trigger, you must first publish a message and then click the Test button to see whether the message is received.

    10. Click Skip. The Trigger output data page appears.

    11. Click Done. The Workflow canvas appears.

    12. Search for the Logger connector and drag and drop the Logger connector on to the canvas.

    13. Click the warning icon on the Logger. The Logger page appears.

    14. Click Next. The Logger fields appear.

    15. Drag and drop string to the Log Data field.

    16. Click Next. The Test this action page appears.

    17. Click Done. The Workflow canvas appears.

    18. Connect Logger to the Stop step.

    19. Provide a name and description for the Workflow.

    20. Save the Workflow. Now the Workflow is ready to receive messages and process further steps based on the filters specified.

    Publish Messages

    1. Open the T1_publish_workflow from the Workflows page.

    2. Click .

    3. Go to Monitor > Execution results > Workflow execution. The Workflow execution statistics appear. You can observe that the Execution source column for the:

      • T1_subscriber_workflow is Trigger.

      • T1_publisher_workflow is Manual.

    In this way, you can publish and subscribe messages using Workflows.

    Publish and Consume a Document

    Summary

    The following high-level tasks are demonstrated in this example:

    1. Create a topic, todays_quote.

    2. Create a document type, doc_quote from scratch to publish.

    3. Create a publisher FlowService, publish_doc_quote, to publish a document.

    4. Create a consumer FlowService, consume_doc_quote, that logs the same data sent in the published document.

    5. Create a subscriber, todays_quote_subscriber, to consume messages published to topic.

    6. Create a consumer workflow, todays_quote_subscriber2, that logs the same data sent in the published document.

    7. Run the publisher FlowService and check if both the consumers have executed successfully.

    Basic Flow

    Create Topic

    1. Log in to webMethods.io Integration and create a project, for example, Messaging_Ops. You can also select an existing project.

    2. Click Messaging > Topics. The Messaging - Topics page appears.

    3. Click Add Topic. The New topic page appears.

    4. Enter the topic name as, todays_quote.

    5. Save the topic. The newly created topic details appear.

    Create Document Type

    1. Go to Configurations > FlowService > Document Types > Add Document Type. The Add new Document type dialog box appears.

    2. Select Build from scratch.

    3. Click OK. The Add new Document type page appears.

    4. Click Load JSON. The Type or paste JSON content text box appears.

    5. Paste the content.

    6. Click Load JSON. The Add new Document type page appears.

    7. Click Save. The newly created document type appears under Document Types.

    Create Publisher

    1. Click Integrations > FlowServices. The FlowServices page appears.

    2. Click . The Start creating the FlowService page appears.

    3. Enter the FlowService name as publish_doc_quote.

    4. [Optional] Enter a short description of the FlowService under FlowService name.

    5. Type Messaging in the FlowService step 1 and select Messaging from the list that appears. The fields associated with the Messaging application appears.

    6. Select the following options:

      a. Action - publish

      b. Destination type - Topic

      c. Destination - todays_quote

      d. Account - Default account

    7. Click Define I/O. The Define input and output fields page appears.

    8. Select the Add a new set option. The data fields appear.

    9. Enter the following details:

      a. Name - quote

      b. Type - Document Reference

      c. Document reference - doc_quote

    10. Click Done. The FlowService page appears.

    11. Click to map the input and output fields. The Pipeline panel appears.

    12. Map the quote document reference from the input pipeline to the data field in the JMS message body.

    13. Click Save.

    14. Close the Pipeline panel. The FlowService page appears.

    15. Click Save. The FlowService is ready to publish messages.

    Create Consumer FlowService

    1. Click Integrations > FlowServices. The FlowServices page appears.

    2. Click . The Start creating the FlowService page appears.

    3. Enter the FlowService name as consume_doc_quote.

    4. [Optional] Enter a short description of the FlowService under FlowService name.

    5. Click Define I/O. The Define input and output fields page appears.

    6. Select Specification Reference.

    7. Select the Messaging Service.

    8. Click Done. The FlowService page appears.

    9. Do the following steps in order to retrieve fields of the published quote document, you must first map the data to doc_quote in the transform pipeline step.

      a. Type Transform in the FlowService step 1 and select Transform Pipeline from the list that appears.

      b. Click to map the input and output fields. The Pipeline panel appears.

      c. Click in the Pipeline Output. The Pipeline output page appears.

      d. Enter the following details:

      i. Name - doc_quote

      ii. Type - Document Reference

      iii. Document reference - doc_quote

      e. Click Save. The Pipeline panel appears.

      f. Map the data field under the JMSMessage body to the newly created doc_quote field.

      g. Close the Pipeline panel. The FlowService page appears.

    10. Do the following step to log the quote that is received:

      a. Type logCustomMessage in the FlowService step 1.

      b. Click to map the input and output fields. The Pipeline panel appears.

      c. Double-click message under the Input column. The Set Value page appears.

      d. Add the custom message: Today’s quote is “%/doc_quote/content%“, by “%/doc_quote/author%.

      e. Select Perform pipeline variable substitution.

      f. Click Save. The Pipeline panel appears.

    11. Close the Pipeline panel. The FlowService page appears.

    12. Click Save.

    Create Subscriber

    Create a subscriber, todays_quote_subscriber, for consuming the messages sent to the topic todays_quote.

    1. Go to Messaging > Subscribers. The Subscribers page appears.

    2. Click Add Subscriber. The New subscriber page appears.

    3. Enter the following details:

      a. Subscriber Name - todays_quote_subscriber

      b. Description - Consumes messages from todays_quote

      c. Destination type- Topic

      d. Select destination- todays_quote

      e. Invocation type - FlowService

      f. Select invocation - consume_doc_quote

      g. Click Save. The subscriber is created.

    Create Consumer Workflow

    Create another subscriber, todays_quote_subscriber2, for consuming the messages sent to the topic, todays_quote.

    1. Click Integrations > Workflows. The Workflows page appears.

    2. Click . The Start Building your Workflow page appears.

    3. Click Create New Workflow to start creating a Workflow for subscribing messages. The Workflow canvas appears.

    4. Click the Settings icon on the Start step . The Trigger page appears.

    5. Search and select the Messaging Service trigger.

    6. Click Next. The Messaging Service page appears.

    7. Perform the following steps to add a subscriber:

      a. Click . The Add subscriber page appears.

      b. Subscriber Name - todays_quote_subscriber2

      c. Description - Consumes messages received from todays_quote

      d. Destination type - Topic

      e. Destination - todays_quote

      f. Click Save. The subscriber is created.

    8. Click Save. The Test trigger page appears.

      Note: If you want to test the trigger, you must first publish a message and then click the Test button to see whether the message is received.

    9. Open the publisher FlowService publish_doc_quote in a separate tab.

    10. Click . The Input values page appears.

    11. Add the input values as shown:

    12. Click Run. The Run Successful message appears if the FlowService runs successfully.

    13. Go to the previous tab where the consume_doc_quote_workflow is open.

    14. Click Test. The OUTPUT tab contains the document that was published in the earlier step.

    15. Click Done. The Workflow canvas appears.

    16. Search for the Logger connector and drag and drop the Logger connector on to the canvas.

    17. Click the warning icon on the Logger. The Logger page appears.

    18. Click Next. The Logger fields appear. Note that the quote document is available in the JMS message body data fields.

    19. Paste the following text in the log data box: Today’s quote is “{{$trigger.JMSMessage.body.data.content}}” by {{$trigger.JMSMessage.body.data.author}}.

    20. Click Next. The Test this action page appears.

    21. Click Done. The Workflow canvas appears.

    22. Connect Logger to the Stop step.

    23. Provide a name and description for the Workflow.

    24. Save the Workflow.

    Publish Messages

    1. Open the publish_doc_quote flowservice.

    2. Click . The Input values page appears.

    3. Add the input values as shown:

    4. Click Run. The Run Successful message appears if the FlowService runs successfully. The document is published to topic.

    5. Go to Monitor > Execution results > FlowService execution. The FlowService execution statistics appear. You can observe that status is success.

      Also, the message is logged.

    6. Go to Monitor > Execution results > Workflow execution. The Workflow execution statistics appear.

    7. Select the logger step to see the log message