-
Notifications
You must be signed in to change notification settings - Fork 116
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
feat: Built-in Pulsar source #2237
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Vigith Maurice <[email protected]>
Signed-off-by: Sreekanth <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2237 +/- ##
==========================================
+ Coverage 63.91% 64.19% +0.27%
==========================================
Files 338 342 +4
Lines 41085 41174 +89
==========================================
+ Hits 26259 26431 +172
+ Misses 13756 13670 -86
- Partials 1070 1073 +3 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Sreekanth <[email protected]>
Signed-off-by: Sreekanth <[email protected]>
Signed-off-by: Sreekanth <[email protected]>
Signed-off-by: Sreekanth <[email protected]>
Signed-off-by: Sreekanth <[email protected]>
Signed-off-by: Sreekanth <[email protected]>
Signed-off-by: Sreekanth <[email protected]>
rust/numaflow-core/src/message.rs
Outdated
impl TryFrom<PulsarMessage> for Message { | ||
type Error = Error; | ||
|
||
fn try_from(message: PulsarMessage) -> Result<Self> { | ||
let offset = Offset::Int(IntOffset::new(message.offset, 1)); // FIXME: partition id | ||
|
||
Ok(Message { | ||
keys: vec![message.key], | ||
value: message.payload, | ||
offset: Some(offset.clone()), | ||
event_time: message.event_time, | ||
id: MessageID { | ||
vertex_name: get_vertex_name().to_string(), | ||
offset: offset.to_string(), | ||
index: 0, | ||
}, | ||
headers: message.headers, | ||
}) | ||
} | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move this to source/pulsar.rs
type PulsarSource struct { | ||
ServerAddr string `json:"serverAddr" protobuf:"bytes,1,name=server_addr"` | ||
Topic string `json:"topic" protobuf:"bytes,2,name=topic"` | ||
ConsumerName string `json:"consumerName" protobuf:"bytes,3,name=consumerName"` | ||
SubscriptionName string `json:"subscriptionName" protobuf:"bytes,4,name=subscriptionName"` | ||
MaxUnack uint32 `json:"maxUnack,omitempty" protobuf:"bytes,5,opt,name=maxUnack"` | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add TLS and Auth too, if you prefer you can do that in a follow up PR.
Signed-off-by: Sreekanth <[email protected]>
Signed-off-by: Sreekanth <[email protected]>
Signed-off-by: Sreekanth <[email protected]>
Signed-off-by: Sreekanth <[email protected]>
Signed-off-by: Sreekanth <[email protected]>
Status: Tested by running a Pipeline and a Monovertex with Pulsar as built-in source