File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -17,9 +17,10 @@ function processAction(msg, cfg) {
17
17
const amqpURI = cfg . amqpURI ;
18
18
const amqpExchange = cfg . topic ;
19
19
const queueName = `eio_consumer_${ process . env . ELASTICIO_TASK_ID } _${ process . env . ELASTICIO_USER_ID } ` ;
20
- const keys = ( cfg . bindingKeys || '#' ) . split ( ',' ) . map ( ( s ) => s . trim ( ) ) ;
20
+ const keys = ( cfg . bindingKeys || '#' ) . split ( ',' ) . map ( ( s ) => s . trim ( ) ) ;
21
21
const consumer = ( msg ) => {
22
- console . log ( 'consuming message %s in generator' , JSON . stringify ( msg . content . toString ( ) ) ) ;
22
+ console . log ( 'Have got message %s' , JSON . stringify ( msg . content . toString ( ) ) ) ;
23
+ this . emit ( 'data' , eioUtils . newMessageWithBody ( { } ) ) ;
23
24
} ;
24
25
co ( function * ( ) {
25
26
console . log ( 'Connecting to amqpURI=%s' , amqpURI ) ;
@@ -38,7 +39,7 @@ function processAction(msg, cfg) {
38
39
autoDelete : true
39
40
} ) ;
40
41
41
- for ( let key of keys ) {
42
+ for ( let key of keys ) {
42
43
console . log ( `Binding queue to exchange queue=${ queueName } exchange=${ amqpExchange } bindingKey=${ key } ` ) ;
43
44
yield channel . bindQueue ( queueName , amqpExchange , key ) ;
44
45
}
You can’t perform that action at this time.
0 commit comments