solace-events

n8n community nodes for Solace PubSub+ event mesh - Event Trigger, Publish, and Agent Mesh Request

Documentation

n8n-nodes-solace

n8n community nodes for Solace PubSub+ event mesh integration.

This package provides three nodes to integrate n8n workflows with Solace PubSub+ event brokers and Solace Agent Mesh:

  1. Solace Event Trigger - Start workflows when events arrive on Solace topics
  2. Solace Publish - Publish events to Solace event mesh
  3. Solace Agent Mesh Request - Send prompts to Solace Agent Mesh (SAM)

What is Solace PubSub+?

Solace PubSub+ is an enterprise event broker that enables event-driven architecture across hybrid and multi-cloud environments. It supports multiple messaging protocols (MQTT, AMQP, REST, WebSocket) and provides guaranteed message delivery, topic-based routing, and enterprise-grade security.

Key features:

  • Event Mesh - Connect applications across clouds, regions, and on-premises
  • Guaranteed Delivery - Persistent messaging with exactly-once delivery semantics
  • Topic Hierarchy - Flexible topic-based routing with wildcards
  • REST Messaging - Simple HTTP-based publish/subscribe

Installation

In n8n

  1. Go to Settings > Community Nodes
  2. Select Install
  3. Enter n8n-nodes-solace and click Install

Manual Installation

cd ~/.n8n/custom
npm install n8n-nodes-solace

Then restart n8n.

Credentials Setup

Solace SEMP API (for Event Trigger)

The Event Trigger node requires admin credentials to provision resources on the broker:

Field Description Example
Base URL SEMP API endpoint (no trailing slash) https://broker.messaging.solace.cloud:943
Message VPN Name Your VPN name default
Username Admin username admin
Password Admin password your-password
Allow Insecure TLS Skip certificate validation (dev only) false

Note: For Solace Cloud, use port 943 for SEMP API access.

Solace REST Messaging API (for Publish)

The Publish node uses REST messaging credentials:

Field Description Example
Scheme HTTP or HTTPS http
Host Broker hostname broker.messaging.solace.cloud
Port REST messaging port 9000 (HTTP) or 9443 (HTTPS)
Username Client username solace-cloud-client
Password Client password your-password

Solace Agent Mesh API (for Agent Mesh Request)

The Agent Mesh Request node connects to a SAM REST gateway:

Field Description Example
Base URL SAM gateway URL http://localhost:5050
Authentication Type None or Bearer bearer
Bearer Token API token (if bearer auth) your-token

Nodes

Solace Event Trigger

Starts a workflow when events are published to specified Solace topics. This node automatically provisions the required broker resources (Queue, REST Delivery Point, REST Consumer) when activated.

Configuration

Parameter Description
Topic Subscriptions Comma-separated topics to subscribe to. Supports Solace wildcards (*, >)
Queue Name Override Optional custom queue name (auto-generated if empty)
RDP Name Override Optional custom RDP name
REST Consumer Name Override Optional custom consumer name
Payload Format json (auto-parse) or raw
Include Headers Include HTTP headers in output
Include Query Parameters Include query params in output

Output

{
  "topic": "orders/created",
  "payload": { "orderId": "12345", "status": "new" },
  "receivedAt": "2024-01-15T10:30:00.000Z",
  "headers": { ... },
  "query": { ... }
}

How It Works

When the workflow is activated:

  1. Creates a durable queue with subscriptions to your topics
  2. Creates a REST Delivery Point (RDP)
  3. Configures the RDP to forward messages to n8n's webhook URL
  4. Messages published to matching topics are delivered to your workflow

When deactivated, all provisioned resources are automatically cleaned up.

Broker Requirements

  • REST messaging service enabled
  • SEMP management access (admin credentials)
  • Guaranteed messaging enabled on VPN
  • Sufficient queue/RDP quota

Solace Publish

Publishes events to Solace PubSub+ via REST messaging.

Configuration

Parameter Description
Topic Target topic (e.g., orders/created)
Payload Type json or text
JSON Payload JSON data to send
Text Payload Plain text to send
Content Type Override Custom Content-Type header
Delivery Mode direct, persistent, or broker default
Additional Headers Custom HTTP headers
Timeout Request timeout in ms

Output

{
  "success": true,
  "topic": "orders/created",
  "payloadType": "json",
  "contentType": "application/json",
  "deliveryMode": "persistent",
  "statusCode": 200,
  "timestamp": "2024-01-15T10:30:00.000Z"
}

Solace Agent Mesh Request

Sends prompts to a Solace Agent Mesh (SAM) via its REST gateway.

Configuration

Parameter Description
Prompt The prompt/question to send
Stream Response Enable streaming (experimental)
Target Agent Name Optional agent routing
Session ID Session ID for conversation continuity
Timeout Request timeout in ms (default 60s)

Output

{
  "success": true,
  "prompt": "What is the status of order 12345?",
  "stream": false,
  "response": { "answer": "Order 12345 is in transit..." },
  "statusCode": 200,
  "timestamp": "2024-01-15T10:30:00.000Z"
}

Example Workflows

1. Event-Driven Notifications

Receive Solace events and send to Slack:

[Solace Event Trigger] → [IF] → [Slack]
       ↓                         
 orders/created            Check priority

2. API to Event Mesh

Convert HTTP requests to Solace events:

[Webhook] → [Set] → [Solace Publish]
              ↓
        Transform data    orders/{{$json.action}}

3. AI-Powered Event Processing

Process events with Agent Mesh:

[Solace Event Trigger] → [Solace Agent Mesh Request] → [Solace Publish]
         ↓                          ↓                         ↓
  support/tickets/*         "Analyze ticket..."      support/responses/{{id}}

4. Closed-Loop Automation

[Solace Event Trigger] → [Code] → [HTTP Request] → [Solace Publish]
         ↓                  ↓            ↓                 ↓
   orders/new          Validate     Call API      orders/processed

Topic Wildcards

Solace supports two wildcard characters in topic subscriptions:

  • * - Matches exactly one level (e.g., orders/*/created matches orders/US/created)
  • > - Matches one or more levels (e.g., orders/> matches orders/US/NY/created)

Security Considerations

  1. Separate Credentials: Use different credentials for SEMP admin (Event Trigger) and REST messaging (Publish)
  2. Least Privilege: Grant only necessary permissions to REST messaging users
  3. TLS: Always use HTTPS/TLS in production
  4. VPN Isolation: Use separate VPNs for different environments

Troubleshooting

Event Trigger not receiving messages

  1. Check that the workflow is active (not just saved)
  2. Verify SEMP credentials have admin access
  3. Ensure the broker can reach n8n's webhook URL
  4. Check broker logs for RDP delivery errors

Publish failing with 401

  1. Verify REST messaging credentials
  2. Check that the user has publish permission on the topic
  3. Ensure the REST service is enabled on the VPN

Agent Mesh timeout

  1. Increase the timeout value (SAM requests can be slow)
  2. Check SAM gateway is running and accessible
  3. Verify authentication configuration

Development

# Install dependencies
npm install

# Build
npm run build

# Run linter
npm run lint

# Run tests
npm test

# Watch mode for development
npm run dev

Local Testing with n8n

  1. Clone this repository
  2. Run npm install && npm run build
  3. Create a symlink in your n8n custom nodes directory:
    ln -s /path/to/n8n-nodes-solace ~/.n8n/custom/node_modules/n8n-nodes-solace
    
  4. Restart n8n

License

MIT

Resources

Support

For issues with this package, please open an issue on GitHub.

For Solace product support, visit Solace Support.

Discussion