-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add option to set channel prefetch count * Set plugin tag * Correct linting on gulpfile * Rename and re-organize default properties * Remove config object from README.md * Change client queue default name -> .act * Update default options schema * Make simple example friendlier
- Loading branch information
Showing
10 changed files
with
120 additions
and
113 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,23 @@ | ||
#!/usr/bin/env node | ||
|
||
'use strict'; | ||
|
||
const Path = require('path'); | ||
|
||
require('seneca')() | ||
.use('..') | ||
.add('role:create', function(message, done) { | ||
.add('cmd:salute', function(message, done) { | ||
return done(null, { | ||
pid: process.pid, | ||
id: Math.floor(Math.random() * (message.max - message.min + 1)) + message.min | ||
id: Math.floor(Math.random() * (message.max - message.min + 1)) + message.min, | ||
message: `Hello ${message.name}!`, | ||
from: { | ||
pid: process.pid, | ||
file: Path.relative(process.cwd(), __filename) | ||
}, | ||
now: Date.now() | ||
}); | ||
}) | ||
.listen({ | ||
type: 'amqp', | ||
pin: 'role:create', | ||
url: process.env.AMQP_URL, | ||
socketOptions: { | ||
foo: 'bar' | ||
} | ||
pin: 'cmd:salute', | ||
url: process.env.AMQP_URL | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.