stomp
Version, currently 1.0.04 versions
- 1.0.2latestNov 7, 2024
- 1.0.1not indexedJul 17, 2026
- 1.0.0not indexedJul 17, 2026
- 0.9.0not indexedJul 17, 2026
github.com/spider-gazelle/stomp
crystal lang implementation of the STOMP protocol
Nothing has been indexed for 1.0.0 yet. The tag is recorded, its shard.yml has not been read, so the manifest and dependency list below are empty because they are unknown rather than because they are absent.
Installation
# Add this to your shard.yml
dependencies:
stomp:
github: spider-gazelle/stomp
version: ~> 1.0.0Then run:
shards installshard.yml
No shard.yml has been indexed for 1.0.0. You can read it on the repository.
Dependencies
Unknown: the shard.yml for this version has not been read yet.
README
This README is the one indexed from the repository at its latest ref, not from the tag for this version.
Crystal Lang STOMP Protocol
Communicate with devices supporting the STOMP protocol
Installation
-
Add the dependency to your
shard.yml:dependencies: stomp: github: spider-gazelle/stomp -
Run
shards install
Usage
require "stomp"
hostname = "stomp.server.com"
port = 1234
socket = TCPSocket.new(hostname, port)
# accepts any object implementing `IO`
client = STOMP::IOClient.new(hostname, socket)
# client is ready
client.on_connected do |frame|
client.send client.subscribe("main", "/some/path", HTTP::Headers{
"receipt" => "confirm-main",
})
end
# process messages here
client.on_message do |frame|
frame.headers["subscription"] # => "main" (as specified in the subscription above)
frame.headers["destination"] # => "/some/path"
# get the data, handles charset automatically
frame.body_text
# or can get the raw bytes
frame.body
end
# if you are interested in receipts
client.on_receipt do |frame|
frame.headers["receipt-id"] # => "confirm-main"
end
# if you are interested in errors
client.on_error do |frame|
message = frame.headers["message"]? || frame.body_text
Log.error { message }
# maybe you want to close on error?
client.close
end
client.on_close do |frame|
received_closed += 1
end
# blocks until the socket is closed or an unhandled error occurs
# client is thread safe
client.run
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This release
- Version
1.0.0- Tagged
- Jul 17, 2026
- Commit
58880bb27363- Indexed
- not yet
Dependents
No indexed shard depends on this one yet.
Repository
github.com/spider-gazelle/stomp
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 15, 2026
- Synced
- Aug 15, 2026
- Versions
- 4