PowerQueue is a message queue that speaks AMQP 0-9-1, Amazon SQS, Google Cloud Pub/Sub, Azure Queue Storage and Azure Service Bus. This public service is free for anyone to use: point the official client library you already use at it, with an identifier you generate yourself. No signup, no account, no payment. No uptime guarantee, and no guarantee your data survives. The service is down for maintenance from time to time. Your queues and messages normally persist across those restarts, but nothing is backed up and data may be lost at any time, for example when a storage format changes. A message lives at most 1 hour, a tenant holds at most 16 MiB of messages, and a tenant with no activity for 7 days is deleted with everything in it. Use the service for learning, testing, demonstrations and hobby projects, never for anything you cannot afford to lose. Totally freeNo charges, no payment details, no paid tier. No account requiredNo signup, no email, no API keys. Your identifier is your tenant. Usage is logged, with client IP addresses (terms). Five protocolsOfficial SDKs, unmodified: only the endpoint and credentials change. DisposableDown from time to time; no backups; messages live 1 hour; idle tenants deleted after 7 days. Get an identifier Every request names a tenant identifier: 24 characters, a lowercase letter followed by 23 lowercase letters or digits. The first request that names an identifier creates its tenant; there is nothing to register. This page generates one in your browser from a cryptographically random source, without contacting the server. You may also make your own, as long as it is chosen at random. The identifier is the secret. There are no passwords: anyone who knows your identifier can read, send and delete everything in your tenant, and it appears in URLs and resource names. Keep it private, and never pick a memorable one. Quick start Thirty seconds per protocol. Each example sends a message and reads it back, in Python with the official library. The queue does not need to exist first: using a name creates it. The documentation has more languages, every option and every error. The virtual host is your identifier; any user name and password. Port 5673, TLS. pip install pika import pika url = "amqps://user:password@amqp.powerqueue.link:5673/" with pika.BlockingConnection(pika.URLParameters(url)) as connection: channel = connection.channel() channel.basic_publish(exchange="", routing_key="hello-amqp", body=b"Hello, world") method, properties, body = channel.basic_get("hello-amqp", auto_ack=True) print(body) AMQP 0-9-1 guide The access key id is your identifier; any secret key and region. pip install boto3 import boto3 sqs = boto3.client( "sqs", endpoint_url="https://sqs.powerqueue.link", region_name="us-east-1", aws_access_key_id="", aws_secret_access_key="anything", ) url = sqs.get_queue_url(QueueName="hello-sqs")["QueueUrl"] sqs.send_message(QueueUrl=url, MessageBody="Hello, world") for message in sqs.receive_message(QueueUrl=url, WaitTimeSeconds=5).get("Messages", []): print(message["Body"]) sqs.delete_message(QueueUrl=url, ReceiptHandle=message["ReceiptHandle"]) SQS guide The project id is your identifier; no credentials. Publishing to topic hello-pubsub also creates subscription hello-pubsub. pip install google-cloud-pubsub from google.api_core.client_options import ClientOptions from google.auth.credentials import AnonymousCredentials from google.cloud import pubsub_v1 project = "" options = ClientOptions(api_endpoint="pubsub.powerqueue.link:443") publisher = pubsub_v1.PublisherClient(credentials=AnonymousCredentials(), client_options=options) subscriber = pubsub_v1.SubscriberClient(credentials=AnonymousCredentials(), client_options=options) publisher.publish(publisher.topic_path(project, "hello-pubsub"), b"Hello, world").result() subscription = subscriber.subscription_path(project, "hello-pubsub") response = subscriber.pull(subscription=subscription, max_messages=10) for received in response.received_messages: print(received.message.data) subscriber.acknowledge(subscription=subscription, ack_ids=[r.ack_id for r in response.received_messages]) Pub/Sub guide The account name is your identifier, as the first part of the URL path; any base64 account key. pip install azure-storage-queue from azure.storage.queue import QueueClient queue = QueueClient( account_url="https://azure.powerqueue.link/", queue_name="hello-azure", credential={"account_name": "", "account_key": "YW55dGhpbmc="}, ) queue.send_message("Hello, world") for message in queue.receive_messages(): print(message.content) queue.delete_message(message) Azure Queue Storage guide The shared access key name is your identifier; any key. pip install azure-servicebus from azure.servicebus import ServiceBusClient, ServiceBusMessage connection_string = ( "Endpoint=sb://amqp.powerqueue.link/;" "SharedAccessKeyName=;SharedAccessKey=anything" ) with ServiceBusClient.from_connection_string(connection_string) as client: with client.get_queue_sender("hello-servicebus") as sender: sender.send_messages(ServiceBusMessage("Hello, world")) with client.get_queue_receiver("hello-servicebus", max_wait_time=5) as receiver: for message in receiver.receive_messages(max_message_count=10, max_wait_time=5): print(str(message)) receiver.complete_message(message) Service Bus guide Test it yourself powerqueue_link.py is a small program that checks this service the way an application would, using each protocol's official Python library: pika for AMQP 0-9-1, boto3 for SQS, google-cloud-pubsub, azure-storage-queue and azure-servicebus. Through each of the six interfaces it sends messages of random content and sizes, reads them back, and checks that every message arrived exactly once with the same bytes and attributes, that nothing is left over, and that it deleted what it created. Then it sends through every interface and reads through every other one (20 pairs), and checks the conversions described in How it works. It explains each step as it runs and ends with a summary. It takes two to three minutes. All you need is uv, a free tool that runs Python programs. uv downloads the right version of Python and the libraries the program needs by itself, into a cache of its own, without touching any Python you already have. Install uv (skip this if you have it). On macOS or Linux, in a terminal: curl -LsSf https://astral.sh/uv/install.sh | sh On Windows, in PowerShell: powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex" Open a new terminal window, so the uv command is found. You only need to do this once, right after installing uv. Run the program: uv run https://www.powerqueue.link/downloads/powerqueue_link.py That is all. The first run spends about a minute downloading Python and the libraries; later runs start at once. The first run also makes a tenant identifier and saves it in your user configuration directory, and later runs reuse it. Options go after the address, for example: uv run https://www.powerqueue.link/downloads/powerqueue_link.py --quiet # only the summary uv run https://www.powerqueue.link/downloads/powerqueue_link.py --skip-cross # only the six interfaces uv run https://www.powerqueue.link/downloads/powerqueue_link.py --tenant uv run https://www.powerqueue.link/downloads/powerqueue_link.py --new-tenant # start with a fresh tenant It is a plain Python script, so there is no installer and nothing for macOS or Windows to warn about. You can read it before you run it, or download it and run your copy with uv run powerqueue_link.py. What it does, and does not do It connects only to this service: sqs., pubsub., azure. and amqp.powerqueue.link on ports 443, 5671 and 5673. A guard in the program refuses every other connection Python makes. Google's Pub/Sub library connects from its own compiled code, which Python cannot see, so that one connection is not guarded; it goes to pubsub.powerqueue.link:443, the only address the program gives it. It sends only random test data. It reads none of your files, ignores your AWS configuration and credentials and any proxy settings, sends no telemetry, and never updates itself. It keeps well inside the service's limits, turns off the libraries' retries, and stops at the first rate-limit refusal rather than retrying. It deletes the queues and topics it creates, also when it fails or you press Ctrl-C. It does not sandbox itself. To confine it, run it in a container, for example: docker run --rm --cap-drop ALL --security-opt no-new-privileges ghcr.io/astral-sh/uv:python3.12-bookworm-slim uv run https://www.powerqueue.link/downloads/powerqueue_link.py --tenant Checking the download The program names the exact version of every library it uses, so every run uses the same code. SHA256SUMS is signed with the release key, an OpenSSH Ed25519 key: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIPi6Z121baPCUIOeDWkLK334LKa1aGxzlEZPB50iUt+ To check a download before running it, fetch powerqueue_link.py, SHA256SUMS, SHA256SUMS.sig and allowed_signers into one directory, then: ssh-keygen -Y verify -f allowed_signers -I powerqueue.link -n file -s SHA256SUMS.sig < SHA256SUMS sha256sum --check SHA256SUMS # macOS: shasum -a 256 --check SHA256SUMS uv run powerqueue_link.py Learn more How it worksWhat PowerQueue is, tenants, queues that need not be created, the limits and why. Developer documentationEndpoints, every SDK's configuration, supported operations, errors and troubleshooting. Terms of useWhat you may and may not do, and what is logged. Questions, problems, or anything else about this service: andrew.stuart@supercoders.com.au.
AI NEWS JOURNAL
Hacker News Show HNAI NEWS / JOURNAL
Show HN: PowerQueue free online message queue supports AWS, GCE, Azure, AMQP
Article URL: https://www.powerqueue.link Comments URL: https://news.ycombinator.com/item?id=50503655 Points: 4 # Comments: 1
翻訳サービスが停止中のため原文を表示しています。