Registry / messaging / ons-client

ons-client

JSON →
library1.2.6javamavenunverified

A Java client for Alibaba Cloud's Open Notification Service (ONS) for messaging.

<dependency> <groupId>com.aliyun.openservices</groupId> <artifactId>ons-client</artifactId> <version>1.2.6</version> </dependency>
INSTALL
IMPORT
SIG · ONS-CLIENT
O
ons-client
messagingjavav1.2.6
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Producer
com.aliyun.openservices.ons.api.Producer

Initialize and start an ONS producer.

import com.aliyun.openservices.ons.api.Producer; import com.aliyun.openservices.ons.api.ONSFactory; import com.aliyun.openservices.ons.api.PropertiesKey; import java.util.Properties; public class Example { public static void main(String[] args) { Properties props = new Properties(); props.setProperty(PropertiesKey.ProducerId, "YOUR_PRODUCER_ID"); props.setProperty(PropertiesKey.AccessKey, "YOUR_ACCESS_KEY"); props.setProperty(PropertiesKey.SecretKey, "YOUR_SECRET_KEY"); Producer producer = ONSFactory.createProducer(props); producer.start(); System.out.println("Producer started"); } }
Debug
Known issues
gotchaThis client is specific to Alibaba Cloud ONS; not compatible with other message brokers.
fix
Use a standard JMS client if you need multi-broker compatibility.
affects: all
Upgrade
Version history
1.2.6latest on Maven
Audit
Dependencies

No dependency data recorded yet.

Agent activity
21 hits · last 30 days
node
20
OpenAI (training)
1
Resources
ons-client — mvn dependency:get ons-client · libregistry