Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Events with type with more that 2 segments fail to get published #10997

Closed
sayanh opened this issue Mar 26, 2021 · 1 comment · Fixed by #11007, #11008, #11036 or #11034
Closed

Events with type with more that 2 segments fail to get published #10997

sayanh opened this issue Mar 26, 2021 · 1 comment · Fixed by #11007, #11008, #11036 or #11034
Assignees
Labels
area/eventing Issues or PRs related to eventing kind/bug Categorizes issue or PR as related to a bug.

Comments

@sayanh
Copy link
Contributor

sayanh commented Mar 26, 2021

Description

The subscribers don't get triggered if there are more than 2 segments after application name and version. E.g. sap.kyma.custom.framefrog-c4c.Account.Root.Created.v1. What happens here is, framefrog-c4c.Account is treated as an application and is cleaned up.
The differences created while publishing/subscribing are as follows:

[PUB sap.kyma.custom.framefrogc4c.Account.Root.Created.v1 342]
[SUB sap.kyma.custom.framefrogc4cAccount.Root.Created.v1  86]

Expected result

[PUB sap.kyma.custom.framefrogc4c.Account.Root.Created.v1 342]
[SUB sap.kyma.custom.framefrogc4c.Account.Root.Created.v1  86]

Steps to reproduce

Sample subscription:

apiVersion: eventing.kyma-project.io/v1alpha1
kind: Subscription
metadata:
  name: test-c4c-2-excitable-usual
  namespace: framefrog-c4c
  ownerReferences:
  - apiVersion: serverless.kyma-project.io/v1alpha1
    kind: Function
    name: test-c4c-2
    uid: b8a95949-836c-4eb4-a938-5e9ce0beb96c
  resourceVersion: "2858069"
  selfLink: /apis/eventing.kyma-project.io/v1alpha1/namespaces/framefrog-c4c/subscriptions/test-c4c-2-excitable-usual
  uid: aa8b28a2-4d9a-4367-b73c-ff97121dc587
spec:
  filter:
    filters:
    - eventSource:
        property: source
        type: exact
        value: ""
      eventType:
        property: type
        type: exact
        value: sap.kyma.custom.framefrog-c4c.Account.Root.Created.v1
    - eventSource:
        property: source
        type: exact
        value: ""
      eventType:
        property: type
        type: exact
        value: sap.kyma.custom.framefrog-c4c.Account.Root.Updated.v1
  protocol: ""
  protocolsettings:
    exemptHandshake: true
    qos: AT-LEAST-ONCE
  sink: http://test-c4c-2.framefrog-c4c.svc.cluster.local

Troubleshooting

Kyma version 1.21-rc1

@sayanh sayanh added area/eventing Issues or PRs related to eventing kind/bug Categorizes issue or PR as related to a bug. labels Mar 26, 2021
@sayanh sayanh changed the title Event type with more that 2 segments fails to get published to the right topic Events with type with more that 2 segments fail to get published to the right topic Mar 26, 2021
@sayanh sayanh changed the title Events with type with more that 2 segments fail to get published to the right topic Events with type with more that 2 segments fail to get published Mar 26, 2021
@marcobebway marcobebway self-assigned this Mar 29, 2021
@marcobebway marcobebway linked a pull request Mar 29, 2021 that will close this issue
@marcobebway marcobebway linked a pull request Mar 29, 2021 that will close this issue
@marcobebway
Copy link
Contributor

marcobebway commented Mar 30, 2021

(As agreed with @k15r)

Assumption: a valid application name should not contain the "." character.

We will create the NATS Subscriptions as follows:

  • If the event consists of exactly two segments, for example prefix.application.Segment1.Segment2.v1, the NATS Subscription should be the same prefix.application.Segment1.Segment2.v1.
  • If the event consists of more than two segments, for example prefix.application.Segment1.Segment2.Segment3.Segment4.v1, the NATS Subscription should be prefix.application.Segment1Segment2Segment3.Segment4.v1.

SUB: prefix.application.Segment1.Segment2.Segment3.Segment4.v1
PUB: prefix.application.Segment1Segment2Segment3.Segment4.v1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/eventing Issues or PRs related to eventing kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
2 participants