Configs2026年7月19日·1 分钟阅读

Apache ActiveMQ — Reliable Open-Source Java Message Broker

Apache ActiveMQ is a popular open-source message broker written in Java that supports JMS, AMQP, STOMP, MQTT, and OpenWire protocols for reliable asynchronous messaging between applications.

Agent 就绪

先审查再安装

这个资产需要先审查。复制的指令会要求 Agent dry-run、列出写入项,确认后再继续。

Needs Confirmation · 64/100策略:需确认
Agent 入口
任意 MCP/CLI Agent
类型
Skill
安装
Single
信任
信任等级:Established
入口
Apache ActiveMQ Overview
先审查命令
npx -y tokrepo@latest install 8e6ccc62-83b2-11f1-9bc6-00163e2b0d79 --target codex

先 dry-run,确认写入项后再运行此命令。

Introduction

Apache ActiveMQ is one of the most widely deployed open-source message brokers. It decouples producers and consumers in distributed systems by providing reliable queues and topics. ActiveMQ implements the JMS specification and supports multiple wire protocols, making it accessible from Java, Python, Node.js, .NET, and other platforms.

What ActiveMQ Does

  • Routes messages between applications using queues (point-to-point) and topics (publish-subscribe)
  • Supports JMS 2.0, AMQP 1.0, STOMP, MQTT, and its native OpenWire protocol
  • Provides persistent message storage with KahaDB for guaranteed delivery
  • Offers a web-based admin console for monitoring queues, topics, and connections
  • Supports broker networks for clustering and geographic distribution

Architecture Overview

ActiveMQ Classic runs as a standalone Java process that accepts connections over multiple transports (TCP, SSL, WebSocket, VM). Messages arrive at destinations (queues or topics) and are stored in a persistence adapter — KahaDB by default — until consumed. Consumers connect, subscribe, and receive messages with configurable acknowledgment modes. A network of brokers can be configured where each broker forwards messages to peers, enabling horizontal scaling and fault tolerance. The advisory message system exposes internal events for monitoring.

Self-Hosting & Configuration

  • Download the ActiveMQ Classic distribution and run ./bin/activemq start
  • Configure broker settings in conf/activemq.xml including transport connectors and persistence
  • Access the web console at port 8161 for queue monitoring and management
  • For Spring Boot, add spring-boot-starter-activemq for auto-configured JMS templates
  • Deploy in Docker using the official apache/activemq-classic container image

Key Features

  • Multi-protocol support connects Java JMS clients alongside MQTT IoT devices and AMQP services
  • Persistent and non-persistent delivery modes with configurable storage backends
  • Message groups, virtual destinations, and composite destinations for advanced routing
  • Built-in scheduler for delayed and periodic message delivery
  • Network of brokers enables clustering without a shared database

Comparison with Similar Tools

  • RabbitMQ — Erlang-based broker with strong AMQP support; ActiveMQ is Java-native with broader JMS support
  • Apache Kafka — Distributed log for streaming; ActiveMQ is a traditional message broker with queues and topics
  • Apache Artemis — Next-generation ActiveMQ with a new core; Classic is mature and widely deployed
  • Redis Pub/Sub — In-memory messaging without persistence guarantees; ActiveMQ provides durable message storage
  • Amazon SQS — Managed cloud queue; ActiveMQ is self-hosted with no vendor lock-in

FAQ

Q: What is the difference between ActiveMQ Classic and ActiveMQ Artemis? A: Classic is the long-standing broker with a large install base. Artemis is the next-generation broker with a redesigned core for higher throughput. Both are maintained under the Apache ActiveMQ project.

Q: Can ActiveMQ handle high message throughput? A: Classic handles thousands of messages per second. For higher throughput, consider Artemis or a network of brokers.

Q: Does ActiveMQ support message ordering? A: Yes. Messages within a single queue are delivered in order to a single consumer. Message groups extend ordering across multiple consumers.

Q: Can I use ActiveMQ with Spring Boot? A: Yes. The spring-boot-starter-activemq dependency auto-configures a JmsTemplate and connection factory.

Sources

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产