Open dgonzalez opened 8 years ago
Code to reproduce:
Client:
'use strict'
let seneca = require('seneca')()
seneca.use('seneca-redis-transport').ready(function () {
this.act({foo: 'one', bar: 'aloha'}, function (err, response) {
if (err) {
return console.log(err)
}
console.log(response)
})
}).client({type: 'redis', topic: 'my-topic', pin: {foo: 'one'}})
Server:
'use strict'
let seneca = require('seneca')()
seneca.use('seneca-redis-transport').ready(function () {
this.add({foo: 'one'}, function (args, done) {
done(null, {bar: args.bar})
})
})
seneca.listen({type: 'redis', topic: 'my-topic', pin: {foo: 'one'}})
@dgonzalez This code seems to work if you run Server with:
'use strict'
let seneca = require('seneca')()
seneca.use('seneca-redis-transport')
seneca.add({foo: 'one'}, function (args, done) {
done(null, {bar: args.bar})
})
seneca.listen({type: 'redis', topic: 'my-topic', pin: {foo: 'one'}})
It might have been fixed already. I'll have a look. Thanks!
With that being said if you add an additional pattern to the .add that accepts anything ('*'), then I think there's an issue. The server subscribes to a different pattern than the client acts on.
'use strict'
let seneca = require('seneca')()
seneca.use('seneca-redis-transport')
seneca.add({foo: 'one', bar:'*'}, function (args, done) {
done(null, {bar: args.bar})
})
seneca.listen({type: 'redis', topic: 'my-topic', pin: {foo: 'one'}})
Pinning does not work for me either. Is there any progress on this topic?
This is related to (and aggregates):
When the actions are pinned for some reason even if the topic is specified the client is not able to reach the server.