Giter Club home page Giter Club logo

Comments (4)

johnlim avatar johnlim commented on June 8, 2024

##Update
I believe this is associated with issue #501 . I am encountering events not being emitted only after experiencing issue #501. I have experienced it across different apps, services and tenants but as I wasn't specifically trying to reproduce it, didn't document how to duplicate it. I'll update this issue if I can re-duplicate the issue.

from event-gateway.

johnlim avatar johnlim commented on June 8, 2024

Update 2

To duplicate this issue

  1. Continuing off from issue #501, duplicate but rename the createUser function in handler.js and update serverless.yml as follows
  createUserDuplicate:
    handler: handler.createUserDuplicate
    events:
      - eventgateway:
          type: sync
          eventType: http.request
          path: /usersduplicate
          method: POST
  1. run sls deploy
  2. do
curl -X POST -H "Content-Type: application/json" https://${APP}/usersduplicate --data '{ "id": "10", "firstName": "Donald", "lastName": "Duck", "email": "[email protected]" }'
  1. run sls logs --function emailUser. It shows event received
Received user.created event with user:
{ email: '[email protected]',
  firstName: 'Donald',
  id: '10',
  lastName: 'Duck' }
  1. run sls remove
  2. run sls deploy
  3. run
curl -X POST -H "Content-Type: application/json" https://${APP)/usersduplicate --data '{ "id": "10", "firstName": "Donald", "lastName": "Duck", "email": "[email protected]" }'
  1. run sls logs --function createUserDuplicate. It'll show Emitted user.created event
  2. run sls logs --function emailUser. It'll show No existing streams for the function

from event-gateway.

alexdebrie avatar alexdebrie commented on June 8, 2024

Hey @johnlim, thanks for raising.

Can you add the configuration for the function that's subscribed to the user.created event? That should help with debugging.

from event-gateway.

johnlim avatar johnlim commented on June 8, 2024

Hi @alexdebrie, thanks for responding.
I'm basing the code from https://github.com/serverless/event-gateway-getting-started, therefore the configuration that subscribed to the user.created event is as follows:

  emailUser:
    handler: handler.emailUser
    events:
      - eventgateway:
          type: async
          eventType: user.created

I just double-checked the dashboard and realised event-gateway actually fired the event but the subscriber was not triggered in this particular instance.

from event-gateway.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.