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

Support EventHubGroup as an alias over multiple eventhub peers #450

Merged
merged 1 commit into from
Sep 28, 2023

Conversation

iskakaushik
Copy link
Contributor

To support multiple subscriptions and namespaces we will allow a new peer type called EventHubGroup.

CREATE PEER customer_1 FROM EVENTHUB WITH (
  subscription_id = 'my-sub-id',
  resource_group = 'my-rg',
  namespace = 'my-ns',
  location = 'eastus'
);

CREATE PEER customer_2 FROM EVENTHUB WITH (
  ...
);

CREATE PEER eventhub_group_1 FROM EVENTHUBGROUP WITH (
  metadata_db = '...',
  customer_1 = true,
  customer_2 = true
)

After this change mirrors ought to be created with this event hub group peer.

Fixes #441

if err != nil {
return fmt.Errorf("failed to close eventhub client: %v", err)
log.Errorf("failed to close eventhub client: %v", err)
err = fmt.Errorf("failed to close eventhub client: %v", err)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [golangci] reported by reviewdog 🐶
ineffectual assignment to err (ineffassign)

if err != nil {
return fmt.Errorf("failed to close eventhub client: %v", err)
log.Errorf("failed to close eventhub client: %v", err)
err = fmt.Errorf("failed to close eventhub client: %v", err)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [golangci] reported by reviewdog 🐶
ineffectual assignment to err (ineffassign)

To support multiple subscriptions and namespaces we will allow a new peer type called EventHubGroup.

```sql
CREATE PEER customer_1 FROM EVENTHUB WITH (
  subscription_id = 'my-sub-id',
  resource_group = 'my-rg',
  namespace = 'my-ns',
  location = 'eastus'
);

CREATE PEER customer_2 FROM EVENTHUB WITH (
  ...
);

CREATE PEER eventhub_group_1 FROM EVENTHUBGROUP WITH (
  metadata_db = '...',
  customer_1 = true,
  customer_2 = true
)
```

After this change mirrors ought to be created with this event hub group
peer.

Fixes #441
@iskakaushik iskakaushik merged commit b7589fd into main Sep 28, 2023
@serprex serprex deleted the issue/441 branch July 19, 2024 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[eventhub] Ergonomic improvements to EH Peer
2 participants