Closed puttpotsawee closed 7 years ago
@puttpotsawee Thanks for letting me know of this. amqpuri
was updated recently, yes. It was meant to be a no-breaking-changes version bump. Clearly, it wasn't.
I apologize for the inconveniences.
Could you please share a snippet showing how you are declaring/creating your AMQP connection URI (hide/change any sensible information on it)? Even if it is just a string on .client
or .listener
.
I mostly use JSON
declarations for all seneca function
I use this configs
listenings:[
{
type: 'amqp',
pins: [
{ role: 'role-a', cmd: '*' },
{ role: 'role-b', cmd: '*'},
{ role: 'role-c', cmd: '*'},
{ role: 'role-d', cmd: '*'}
],
url: 'amqp://myqmap.com'
}
],
clients: [
{
type: 'amqp',
timeout: 5000,
pins: [
{ role: 'role-e', cmd: '*' },
{ role: 'role-f', cmd: 'task-a' },
{ role: 'role-g', cmd: '*' },
{ role: 'role-h', cmd: '*' },
{ role: 'role-i', cmd: '*' }
],
url: 'amqp://myqmap.com'
}
]
thise configs will be push to seneca.listen()
and seneca.client()
and when in my act
I use something like this
act({role: 'payment', cmd: 'send', paymentData: 'data-a', payload: 'stuff..' })
notice the payload data which is included in a single object along with role
and cmd
and
add({role:'payment', cmd:'send'}, function(args){
//..some function
});
though, i have my own wrapper wrap the seneca.act
and seneca.add
but that should not be any differents in term of the sending options.
I hope this helps
@puttpotsawee I believe I've found what the issue is here. You are running the plugin on node 5.12.0
. We dropped support for node older than LTS a while back. Things may work, but sudden breaking changes may very well occur since we are not testing against those platforms, unfortunately. This is in consonance with the syntax error
you are seeing.
Shrinkwrapping (or yarn) might be your safest bet. My apologies for the inconvenience.
@nfantone Thanks for your help! It really works on node 6.3.1
. I hope u add the fact that even version 1.1.1
will not be supported by node version lower than 6
@puttpotsawee You're welcome. It's on the package.json
"engines"
definition now.
Recently I had an absurd error on
seneca-amqp-transport
on the service that had been run on production for a while, the error says:Because I dockertized all my services and there're only newly build containers show this error, I assume it must be the incompatible version of dependencies, this is the dependencies on the working container:
and this is, for the not-working-version;
notice the version of
amqpuri
dependency,I think there should be the dependency lock or some kind??
right now, my fix was that I need to use npm shrinkwrap to create a dependency lock file
npm-shrinkwrap.json
in your project directory,after a clean
npm install
the amqp transport will continue to work