n8n-nodes-solace-events
v0.1.0
Published
n8n community nodes for Solace PubSub+ event mesh - Event Trigger, Publish, and Agent Mesh Request
Maintainers
Readme
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:
- Solace Event Trigger - Start workflows when events arrive on Solace topics
- Solace Publish - Publish events to Solace event mesh
- 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
- Go to Settings > Community Nodes
- Select Install
- Enter
n8n-nodes-solaceand click Install
Manual Installation
cd ~/.n8n/custom
npm install n8n-nodes-solaceThen 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:
- Creates a durable queue with subscriptions to your topics
- Creates a REST Delivery Point (RDP)
- Configures the RDP to forward messages to n8n's webhook URL
- 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 priority2. 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/processedTopic Wildcards
Solace supports two wildcard characters in topic subscriptions:
*- Matches exactly one level (e.g.,orders/*/createdmatchesorders/US/created)>- Matches one or more levels (e.g.,orders/>matchesorders/US/NY/created)
Security Considerations
- Separate Credentials: Use different credentials for SEMP admin (Event Trigger) and REST messaging (Publish)
- Least Privilege: Grant only necessary permissions to REST messaging users
- TLS: Always use HTTPS/TLS in production
- VPN Isolation: Use separate VPNs for different environments
Troubleshooting
Event Trigger not receiving messages
- Check that the workflow is active (not just saved)
- Verify SEMP credentials have admin access
- Ensure the broker can reach n8n's webhook URL
- Check broker logs for RDP delivery errors
Publish failing with 401
- Verify REST messaging credentials
- Check that the user has publish permission on the topic
- Ensure the REST service is enabled on the VPN
Agent Mesh timeout
- Increase the timeout value (SAM requests can be slow)
- Check SAM gateway is running and accessible
- 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 devLocal Testing with n8n
- Clone this repository
- Run
npm install && npm run build - Create a symlink in your n8n custom nodes directory:
ln -s /path/to/n8n-nodes-solace ~/.n8n/custom/node_modules/n8n-nodes-solace - Restart n8n
License
Resources
- Solace PubSub+ Documentation
- Solace REST Messaging Tutorial
- SEMP v2 API Reference
- n8n Community Nodes Guide
- Solace Agent Mesh
Support
For issues with this package, please open an issue on GitHub.
For Solace product support, visit Solace Support.
