pulsar
БесплатноБез исполняемых скриптовНе проверенApache Pulsar cloud-native messaging and streaming. Covers topics, subscriptions, Pulsar Functions, and geo-replication. Use for multi-tenant, geo-distributed…
от claude-dev-suite★ 51 звезда на GitHubОб этом скилле
Apache Pulsar Core Knowledge
Deep Knowledge: Use
mcp__documentation__fetch_docswith technology:pulsarfor comprehensive documentation.
Quick Start (Docker)
# docker-compose.yml
services:
pulsar:
image: apachepulsar/pulsar:latest
ports:
- "6650:6650" # Broker
- "8080:8080" # Admin API
command: bin/pulsar standalone
volumes:
- pulsar_data:/pulsar/data
volumes:
pulsar_data:
docker-compose up -d
# Create tenant and namespace
docker exec pulsar bin/pulsar-admin tenants create my-tenant
docker exec pulsar bin/pulsar-admin namespaces create my-tenant/my-namespace
# Test
docker exec pulsar bin/pulsar-client produce persistent://my-tenant/my-namespace/orders -m "test"
docker exec pulsar bin/pulsar-client consume persistent://my-tenant/my-namespace/orders -s "test-sub"
Core Concepts
| Concept | Description |
|---|---|
| Tenant | Top-level isolation unit |
| Namespace | Administrative unit within tenant |
| Topic | Message stream (persistent/non-persistent) |
| Subscription | Named cursor with delivery semantics |
| Partition | Topic partitioning for parallelism |
| Bookie | Storage layer (Apache BookKeeper) |
Architecture
┌─────────────────────────────────────────────────────────────┐
│ Pulsar Cluster │
│ ┌───────────┐ ┌───────────┐ ┌───────────┐ │
│ │ Broker 1 │ │ Broker 2 │ │ Broker 3 │ │
│ └───────────┘ └───────────┘ └───────────┘ │
│ │ │ │ │
│ ┌─────────────────────────────────────────────┐ │
│ │ BookKeeper (Bookies) │ │
│ │ ┌────────┐ ┌────────┐ ┌────────┐ │ │
│ │ │Bookie 1│ │Bookie 2│ │Bookie 3│ │ │
│ │ └────────┘ └────────┘ └────────┘ │ │
│ └─────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────┘
Subscription Types
| Type | Description | Use Case |
|---|---|---|
| Exclusive | Single consumer | Ordered processing |
| Shared | Round-robin to consumers | Load balancing |
| Failover | Active-standby | High availability |
| Key_Shared | Key-based routing | Ordered per key |
Producer Patterns
Node.js (pulsar-client)
import Pulsar from 'pulsar-client';
const client = new Pulsar.Client({
serviceUrl: 'pulsar://localhost:6650',
operationTimeoutSeconds: 30,
});
const producer = await client.createProducer({
topic: 'persistent://my-tenant/my-namespace/orders',
sendTimeoutMs: 30000,
batchingEnabled: true,
batchingMaxMessages: 1000,
batchingMaxPublishDelayMs: 10,
});
// Send message
const messageId = await producer.send({
data: Buffer.from(JSON.stringify(order)),
properties: {
'correlation-id': correlationId,
'order-type': order.type,
},
eventTimestamp: Date.now(),
});
console.log(`Sent: ${messageId}`);
// Send with key (for Key_Shared subscription)
await producer.send({
data: Buffer.from(JSON.stringify(order)),
partitionKey: order.customerId,
});
await producer.flush();
await producer.close();
await client.close();
Java (pulsar-client)
@Configuration
public class PulsarConfig {
@Bean
public PulsarClient pulsarClient() throws PulsarClientException {
return PulsarClient.builder()
.serviceUrl("pulsar://localhost:6650")
.operationTimeout(30, TimeUnit.SECONDS)
.build();
}
@Bean
public Producer<byte[]> orderProducer(PulsarClient client) throws PulsarClientException {
return client.newProducer()
.topic("persistent://my-tenant/my-namespace/orders")
.batchingMaxMessages(1000)
.batchingMaxPublishDelay(10, TimeUnit.MILLISECONDS)
.sendTimeout(30, TimeUnit.SECONDS)
.create();
}
}
@Service
public class OrderProducer {
@Autowired
private Producer<byte[]> producer;
public void sendOrder(Order order) throws PulsarClientException {
MessageId messageId = producer.newMessage()
.value(objectMapper.writeValueAsBytes(order))
.property("correlation-id", UUID.randomUUID().toString())
.property("order-type", order.getType())
.eventTime(System.currentTimeMillis())
.key(order.getCustomerId()) // For Key_Shared
.send();
log.info("Sent: {}", messageId);
}
public CompletableFuture<MessageId> sendOrderAsync(Order order) {
return producer.newMessage()
.value(objectMapper.writeValueAsBytes(order))
.sendAsync();
}
}
Python (pulsar-client)
import pulsar
import json
client = pulsar.Client('pulsar://localhost:6650')
producer = client.create_producer(
'persistent://my
Установить pulsar в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
ReadGrepGlobWriteEditFAQ
Что делает скилл pulsar?
Apache Pulsar cloud-native messaging and streaming. Covers topics, subscriptions, Pulsar Functions, and geo-replication. Use for multi-tenant, geo-distributed messaging systems. USE WHEN: user mentions "pulsar", "bookkeeper", "multi-tenancy", "geo-replication", "pulsar functions", asks about "cloud-native streaming", "tenant isolation", "global messaging" DO NOT USE FOR: simple queues - use `rabbitmq` or `sqs`; AWS-native - use `sqs`; Azure-native - use `azure-service-bus`; GCP-native - use `google-pubsub`; lightweight - use `nats`; JMS - use `activemq`
Как установить скилл pulsar?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл pulsar запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic