Questions tagged [seneca]

Seneca is a microservices toolkit for Node.js. It helps you write clean, organized code that you can scale and deploy at any time.

Seneca is a microservices toolkit for Node.js. It provides plugins that look after the foundations of your app. This leaves you free to focus on the real, business code. No need to worry about which database to use, how to structure your components, or how to manage dependencies. Just start coding.

You write everything as a command. Your commands get called whenever they match a set of properties. Your calling code doesn't know, or care, which command gets the work done. One JavaScript object goes in, and another comes out, asynchronously.

senecajs

50 questions
1
vote
1 answer

throw new TypeError('app.use() requires middleware functions');

I'm just trying to run sample codes from Developing Microservices with Node js, and it says: var express = require('express') var bodyParser = require('body-parser') var cookieParser = require('cookie-parser') var methodOverride =…
Dinh Luong
  • 127
  • 3
  • 15
1
vote
1 answer

Docker container: Huge size for Node.js-based microservice

I've been playing around with setting some microservices in a Docker container where the service is based on Seneca.js. Since this is a Node.js application, I derived the container "FROM node". However, the container image is about 600 MB in size.…
martin_wun
  • 1,599
  • 1
  • 15
  • 33
0
votes
1 answer

Seneca amqp transport's dead letter exchange x-message-ttl

I am updating seneca-amqp-transport npm package from 2.1.0 to 2.2.0. I am getting below error while starting the seneca.js microservice. {"message":"Channel closed","stackAtStateChange":"Stack capture: Channel closed by server: 406…
0
votes
1 answer

Senecajs & RabbitMQ... 'amqp' transport doesn't fully work

I have a simple setup of Senecajs and RabbitMQ. Listener // foo.js (listener) var seneca = require('seneca')(); seneca .use('seneca-amqp-transport') .add({ "role": "foo", "cmd": "ping" }, (args, done) => { done(null, { result:…
stedejan
  • 145
  • 1
  • 2
  • 9
0
votes
1 answer

How to add header properties to messages using seneca-amqp-transport

I am working on a project that requires the usage of a few rabbitmq queues. One of the queues requires that the messages are delayed for processing at a time in the future. I noticed in the documentation for rabbmitmq there is a new plugin called…
user1790300
  • 2,143
  • 10
  • 54
  • 123
0
votes
1 answer

How to get a response from a matched pattern in Seneca?

I wonder what is the best way to get a response from a service that matches the request pattern in Seneca? or maybe the receiver should not send an ACK to the publisher. To be more specific I want to get a response from a service that sends an email…
Milad Bonakdar
  • 273
  • 2
  • 16
0
votes
1 answer

can't obtain mongoose model inside one service from another using senecajs

I have two seneca services running on port 3000 and 3001. I am trying to create a separate mongoose connection from service on port 3000 create mongoose model and obtain it in service running on port…
Udit Bhardwaj
  • 1,761
  • 1
  • 19
  • 29
0
votes
1 answer

How do I throw errors from an action in Seneca?

I'm working on a simple task manager in SenecaJS, and I'm trying to understand the correct way to throw errors from an action. Say I've got an action which loads a task from a datastore, and the task doesn't exist... Below is the method from my…
John
  • 1,440
  • 1
  • 11
  • 18
0
votes
1 answer

Could I use Pact.js with Seneca.js

I just came across Pact and Consumer-Driven Contracts pattern these last couple of days and I love it! I'm really new to these patterns and microservices. It seems to me that Pact will be working mainly on HTTP API. So I wonder would Pact be working…
Putt Potsawee
  • 255
  • 3
  • 9
0
votes
1 answer

seneca - communication between two microservices

I'm new in Seneca. I have been trying to make two microservices to communicate each other but I keep failing and get this errors: Error: Response Error: 404 Not Found at module.exports.internals.Utils.internals.Utils.handle_response…
0
votes
1 answer

Client Request Timeout between SenecaJS Service and Express API

I am using SenecaJS to build a microservices based application. So far, I have conceptualized one microservice which consists of only one action yet. This action, when called, will execute a time-consuming shell command (approx. time consumed 3…
Ohm Trivedi
  • 17
  • 1
  • 7
0
votes
0 answers

Seneca.js, Promises, and Error Handling

We are using seneca.js to put messages into a queue in our Node app. We promisified the act call, and wrapped all the seneca use in a service we called MessageBus. So now, MessageBus.publish uses Seneca to put the call on a queue and wait for a…
pjlamb12
  • 2,300
  • 2
  • 32
  • 64
0
votes
4 answers

getting an internal server error when I try to make a request to a Seneca.js API using Axios

I wrote a simple Seneca plugin that I will eventually use to listen for http messages: buyer.js module.exports = function buyer (){ this.add('role:buyer, action: acceptOffer', function(msg, respond){ respond(JSON.stringify({answer:…
David J.
  • 1,753
  • 13
  • 47
  • 96
0
votes
2 answers

TypeError: Cannot read property 'replace' of undefined

Error Seneca Fatal Error ================== Message: seneca: Action cmd:signup,role:api failed: Cannot read property 'replace' of undefined. Code: act_execute Details: { message: 'Cannot read property \'replace\' of undefined', …
0
votes
1 answer

send array in module.exports in promise

I am working on merge swagger files. I want to pass array like [ { method: '1', path: '/signIn', handler: funation() {return "abcd"}, { method: '2', path: '/signOut', handler: funation() {return "123"}, ] I get result as per my need but it was…
Akib
  • 193
  • 1
  • 2
  • 13