Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mumez/tarantube
Tarantool message queue wrapper based on Tarantalk
https://github.com/mumez/tarantube
message-queue pharo tarantalk tarantool
Last synced: 8 days ago
JSON representation
Tarantool message queue wrapper based on Tarantalk
- Host: GitHub
- URL: https://github.com/mumez/tarantube
- Owner: mumez
- License: mit
- Created: 2018-02-05T04:23:42.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-06-25T04:56:33.000Z (over 5 years ago)
- Last Synced: 2024-11-15T17:37:57.799Z (2 months ago)
- Topics: message-queue, pharo, tarantalk, tarantool
- Language: Smalltalk
- Size: 34.2 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Tarantube
Tarantool message queue wrapper based on Tarantalk
[Tarantool queue](https://github.com/tarantool/queue) wrapper based on [Tarantalk](https://github.com/mumez/Tarantalk).```smalltalk
tarantalk := TrTarantalk connect: 'taran:talk@localhost:3301'.
tarantalk tubes. "return currently available tubes"
"Preparing a FIFO tube"
tube := tarantalk ensureTubeNamed: 'my_tube' .
"Adding tasks to the tube"
1 to: 10 do: [:idx | tube putTaskWith: idx asString].
"Taking tasks periodically (with 2 seconds timeout)"
tube repeatTakeTaskFor: 2 ifAvailable: [:task | Transcript cr; show: {task. task data}. task done].
"Get stats"
tube statistics.
```# Installation
```smalltalk
Metacello new
baseline: 'Tarantube';
repository: 'github://mumez/Tarantube/repository';
load.
```And extend your tarantool with [queue module](https://github.com/tarantool/queue).
# Running
Before running tarantool, you need to require queue module in your script.lua file.```lua
box.cfg{listen = 3301}
queue = require('queue')
```