Skip to main content

Plastron STOMP daemon

Project description

plastron-stomp

STOMP listener client for asynchronous and synchronous operations

Running with Python

As a Python module:

python -m plastron.stomp.daemon -c <config file>

Using the console script entrypoint:

plastrond-stomp -c <config file>

Integration Tests

See the integration test README for instructions on running the manual integration tests.

Docker Image

The plastron-stomp package contains a Dockerfile for building the plastrond-stomp Docker image.

Building

Important: This image MUST be built from the main plastron project directory, in order to include the other plastron packages in the build context.

docker build -t docker.lib.umd.edu/plastrond-stomp:latest \
    -f plastron-stomp/Dockerfile .

Running with Docker Swarm

This repository contains a compose.yml file that defines part of a plastrond Docker stack intended to be run alongside the umd-fcrepo-docker stack. This repository's configuration adds a plastrond-stomp container.

# if you are not already running in swarm mode
docker swarm init

# build the image
docker build -t docker.lib.umd.edu/plastrond-stomp:latest \
    -f plastron-stomp/Dockerfile .

# Create an "archelon_id" private/public key pair
# The Archelon instance should be configured with "archelon_id.pub" as the
# PLASTRON_PUBLIC_KEY
ssh-keygen -q -t rsa -N '' -f archelon_id

# Copy the docker-plastron-template.yml and edit the configuration
cp docker-plastron.template.yml docker-plastron.yml
vim docker-plastron.yml

# deploy the stack to run the STOMP application
docker stack deploy -c plastron-stomp/compose.yml plastrond

To watch the logs:

docker service logs -f plastrond_stomp

To stop the STOMP service:

docker service rm plastrond_stomp

Configuration

See docker-plastron.template.yml for an example of the config file.

STOMP Message Headers

The Plastron Daemon expects the following headers to be present in messages received on the JOBS destination:

  • PlastronCommand
  • PlastronJobId

Additional arguments for a command are sent in headers with the form PlastronArg-{name}. Many of these are specific to the command, but there is one with standard behavior across all commands:

Header Description
PlastronArg-on-behalf-of Username to delegate repository operations to

See the messages documentation for details on the headers and bodies of the messages the Plastron STOMP Daemon emits.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

plastron_stomp-4.3.3.tar.gz (13.2 kB view details)

Uploaded Source

Built Distribution

plastron_stomp-4.3.3-py3-none-any.whl (13.3 kB view details)

Uploaded Python 3

File details

Details for the file plastron_stomp-4.3.3.tar.gz.

File metadata

  • Download URL: plastron_stomp-4.3.3.tar.gz
  • Upload date:
  • Size: 13.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for plastron_stomp-4.3.3.tar.gz
Algorithm Hash digest
SHA256 2661e9496540b7db48cf878dc19eecded6b10f58a7195b9631c1f59f0a7535c3
MD5 5a7e12f4c7444e2d8ddca2daeee9ba7e
BLAKE2b-256 722eee9889b0b4cf9b7ed3c5c2a566c9d0d2c0a7ac503a45e8270c2c9ada2184

See more details on using hashes here.

File details

Details for the file plastron_stomp-4.3.3-py3-none-any.whl.

File metadata

File hashes

Hashes for plastron_stomp-4.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f5c3d1dde3f32277b75a8929d27273888ecb45a21243a0d008557afbe0860a58
MD5 6de5f8cdf60efda6fa6b9a698f9eb3a1
BLAKE2b-256 1ade2fd0024ab0e1db45c025a64194333eab80610c530aa34d581152cc7f02c7

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page