{"id":20471573,"url":"https://github.com/backbase/event-emitter","last_synced_at":"2025-05-09T00:32:22.107Z","repository":{"id":63192052,"uuid":"565781145","full_name":"Backbase/event-emitter","owner":"Backbase","description":"Event emitter allows you to produce testing events using REST to the underlying message broker.","archived":true,"fork":false,"pushed_at":"2024-10-29T10:23:49.000Z","size":219,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-05-08T11:45:32.192Z","etag":null,"topics":["backbase","testing"],"latest_commit_sha":null,"homepage":"https://github.com/backbase/event-emitter","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Backbase.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2022-11-14T10:09:22.000Z","updated_at":"2024-10-29T15:19:48.000Z","dependencies_parsed_at":"2024-02-02T15:25:29.080Z","dependency_job_id":"a0382a09-2ed3-4f00-9eb1-1367b942832c","html_url":"https://github.com/Backbase/event-emitter","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Backbase%2Fevent-emitter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Backbase%2Fevent-emitter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Backbase%2Fevent-emitter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Backbase%2Fevent-emitter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Backbase","download_url":"https://codeload.github.com/Backbase/event-emitter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253171112,"owners_count":21865275,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["backbase","testing"],"created_at":"2024-11-15T14:16:32.630Z","updated_at":"2025-05-09T00:32:21.827Z","avatar_url":"https://github.com/Backbase.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg width=\"120\" src=\"Backbase.png?raw=true\" alt=\"Backbase Logo\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\nEvent emitter allows you to produce events using REST to the underlying message broker. This service is used for testing purposes only.\n\u003cp\u003e\n\n\u003cp align=\"center\"\u003e \n    \u003ca href=\"https://github.com/backbase/event-emitter/actions/workflows/main.yml\"\u003e\n        \u003cimg src=\"https://github.com/backbase/event-emitter/actions/workflows/main.yml/badge.svg\" alt=\"Build\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://sonarcloud.io/summary/new_code?id=Backbase_event-emitter\"\u003e\n        \u003cimg src=\"https://sonarcloud.io/api/project_badges/measure?project=Backbase_event-emitter\u0026metric=alert_status\" alt=\"Quality Gate\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://sonarcloud.io/summary/new_code?id=Backbase_event-emitter\"\u003e\n        \u003cimg src=\"https://sonarcloud.io/api/project_badges/measure?project=Backbase_event-emitter\u0026metric=sqale_rating\" alt=\"Maintainability Rating\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://conventionalcommits.org\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg\" alt=\"Conventional Commits\" /\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n---\n\n## Event Emitter\n\nEvent emitter allows you to produce events using REST.\n\n\n### Custom Headers Configuration\n\nIn order to pass custom headers from HTTP request to Event - you need to configure key-value mapping pairs for such headers:\n\n```yaml\nbackbase:\n  event-emitter:\n    custom-header-pairs:\n      - http: X-LOB\n        event: bbLineOfBusiness\n```\n\nThe service will filter out the HTTP headers by the `http` field as key and will set the respective values to the Event under the matching `event` key from configuration.\n\nFor the listed example, if service receive the HTTP request with header `X-LOB: RETAIL` - this header would be converted added to the event as `bbLineOfBusiness: RETAIL`\n\nIf the conversion is not required - please set the same values to `http` and `event`\n\n### Raw Event\n\n```shell\ncurl --location --request POST 'http://localhost:8079/events/raw' \\\n--header 'Content-Type: application/json' \\\n--header 'X-LOB: RETAIL' \\\n--data-raw '{\n    \"destination\": \"Backbase.engagement.ProvisionItem\",\n    \"eventType\": \"com.backbase.engagement.provisioning.messaging.dto.ProvisionItemCommand\",\n    \"body\": {\n        \"provisionedItem\": {\n            \"itemUuid\": \"fdc0db99-8201-402e-b8f4-05fe154d44ba\",\n            \"itemType\": \"\"\n        },\n        \"packageUuid\": \"86d994da-8907-494e-b579-4bc59cfa08e4\",\n        \"destination\": \"\",\n        \"override\": true\n    }\n}'\n```\n\n### Event Spec\n\n```shell\ncurl --location --request POST 'http://localhost:8079/events/com.backbase.dbs.messages.pandp.event.spec.v4.MessageDeliveredEvent' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n    \"id\": \"12345678\",\n    \"recipient\": \"43934ff1-63e4-11ec-bd05-0242ac120004\",\n    \"deliveringDateTime\": \"2021-07-28\",\n    \"conversationId\": \"conversation_id\",\n    \"sender\": null,\n    \"subject\": \"This is subject\",\n    \"body\": \"This is body\",\n    \"category\": \"high\",\n    \"expirationDateTime\": \"2021-08-28T14:16:27Z\",\n    \"important\": true,\n    \"recipientAddress\": \"email@gmail.com\",\n    \"senderId\": \"sender_id\",\n    \"topicName\": \"tIZVfnGOaMRdnIOFVTOEZMxyVRXPKwBKeKi...\",\n    \"additionalProperties\": {\n        \"alternativeTopicName\": \"altname\"\n    }\n}'\n```\n\n```shell\ncurl --location --request POST 'http://localhost:8079/events/com.backbase.transaction.persistence.event.spec.v1.TransactionsAddedEvent' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n    \"transactions\": [\n        {\n            \"arrangementId\": \"f48beab9-8229-11ec-8b7b-0242ac190005\",\n            \"externalId\": \"U0000011\",\n            \"description\": \"Quickbooks monthly subscription fee\",\n            \"bookingDate\": \"2022-02-04T22:53:42.560053\",\n            \"transactionAmountCurrency\": {\n                \"amount\": 300,\n                \"currencyCode\": \"EUR\"\n            },\n            \"id\": \"ac207959-3915-4673-9784-429e4a118e71\",\n            \"counterPartyName\": \"Quickbooks\",\n            \"creditDebitIndicator\": \"DBIT\"\n        },\n        {\n            \"arrangementId\": \"f48beab9-8229-11ec-8b7b-0242ac190005\",\n            \"externalId\": \"U0000011\",\n            \"description\": \"Quickbooks monthly subscription fee\",\n            \"bookingDate\": \"2022-02-04T22:53:43.000000\",\n            \"transactionAmountCurrency\": {\n                \"amount\": 400,\n                \"currencyCode\": \"EUR\"\n            },\n            \"id\": \"ac207959-3915-4673-9784-429e4a118e71\",\n            \"counterPartyName\": \"Quickbooks\",\n            \"creditDebitIndicator\": \"DBIT\"\n        }\n    ]\n}'\n```\n\n```shell\ncurl --location --request POST 'http://localhost:8079/events/com.backbase.audit.persistence.event.spec.v1.AuditExportCompletedEvent' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n    \"status\": \"successful\",\n    \"userId\": \"19aa3423-4bc3-4624-bbbf-75064a441b44\", \n    \"link\": \"https://www.google.com/\",\n    \"serviceAgreementId\": \"35494cc7-3266-11ec-ae7c-ce5ec8981a97\"\n}'\n```\n\n```shell\ncurl --location --request POST 'http://localhost:8079/events/com.backbase.account.statement.event.spec.v1.AccountStatementReadyEvent' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n    \"userId\": \"19aa3423-4bc3-4624-bbbf-75064a441b44\",\n    \"arrangementId\": \"f48beab9-8229-11ec-8b7b-0242ac190005\",\n    \"date\": \"2022-10-17T12:00:00Z\",\n    \"serviceAgreementId\": \"35494cc7-3266-11ec-ae7c-ce5ec8981a97\"\n}'\n```\n\n## Event Consumer\n\nEvent Consumer allows you to subscribe and consume events, store them in in-memory storage and retrieve via REST API.\n\nExample of configuration to enable listening to ActiveMQ topics:\n```\nbackbase.event-emitter.topic-names: Backbase.communication.push-low-priority,Backbase.communication.push-medium-priority,Backbase.communication.push-medium-priority,Backbase.communication.notifications-low-priority,Backbase.communication.notifications-medium-priority,Backbase.communication.notifications-high-priority,Backbase.communication.message-center-low-priority,Backbase.communication.message-center-medium-priority,Backbase.communication.message-center-high-priority,Backbase.communication.sms-low-priority,Backbase.communication.sms-medium-priority,Backbase.communication.sms-high-priority,Backbase.communication.email-low-priority,Backbase.communication.email-medium-priority,Backbase.communication.email-high-priority\n```\n\n### APIs\n- Get all events\n```\nGET /events\n```\n- Get event by correlation id\n```\nGET /events/\u003ccorrelationId\u003e\n```\n- Delete all events (from internal memory storage)\n```\nDELETE /events\n```\n\n## How to produce docker image on your local\n```shell\nmvn clean package -Pdocker-image,local-client -Ddocker.repo.project=development -Djib.to.tags=local-11-05-2023-v1 -Djib.from.platforms=linux/amd64\n```\n\n## Contributing\n\nFirst off, thanks for taking the time to contribute! Contributions are what makes the open-source community such an amazing place to learn, inspire, and create. Any contributions you make will benefit everybody else and are **greatly appreciated**.\n\nPlease adhere to this project's [code of conduct](CODE_OF_CONDUCT.md). For detailed instructions on repo organization, linting, testing, and other\nsteps see our [contributing guidelines](CONTRIBUTING.md)\n\n#### Contributors\n\n[![](https://contrib.rocks/image?repo=backbase/event-emitter)](https://github.com/backbase/event-emitter/graphs/contributors)\n\n## License\n\nThis project is licensed under the **Backbase** license.\n\nSee [LICENSE.md](LICENSE.md) for more information.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbackbase%2Fevent-emitter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbackbase%2Fevent-emitter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbackbase%2Fevent-emitter/lists"}