|
1 | 1 | # Version changelog |
2 | 2 |
|
| 3 | +## Release v0.2.0 |
| 4 | + |
| 5 | +### Native Rust Backend (JNI Migration) |
| 6 | +- The SDK now uses JNI (Java Native Interface) to call the Zerobus Rust SDK instead of pure Java gRPC calls |
| 7 | +- Native library is automatically loaded from the classpath or system library path |
| 8 | +- Token management and background processing handled by native code |
| 9 | + |
| 10 | +### New Stream Classes |
| 11 | + |
| 12 | +**ZerobusProtoStream** - Protocol Buffer ingestion with method-level generics: |
| 13 | +- `ingestRecordOffset(T record)` - Auto-encoded: SDK encodes Message to bytes |
| 14 | +- `ingestRecordOffset(byte[] bytes)` - Pre-encoded: User provides encoded bytes |
| 15 | +- `ingestRecordsOffset(List<T> records)` - Batch auto-encoded ingestion |
| 16 | +- `ingestRecordsOffset(List<byte[]> bytes)` - Batch pre-encoded ingestion |
| 17 | +- `getUnackedRecords()` - Returns `List<byte[]>` of unacked records |
| 18 | +- `getUnackedRecords(Parser<T>)` - Returns parsed `List<T>` of unacked records |
| 19 | +- `getUnackedBatches()` - Returns `List<EncodedBatch>` preserving batch grouping |
| 20 | + |
| 21 | +**ZerobusJsonStream** - JSON ingestion without Protocol Buffer dependency: |
| 22 | +- `ingestRecordOffset(String json)` - Pre-serialized: User provides JSON string |
| 23 | +- `ingestRecordOffset(T obj, JsonSerializer<T>)` - Auto-serialized: SDK serializes object |
| 24 | +- `ingestRecordsOffset(List<String> jsons)` - Batch pre-serialized ingestion |
| 25 | +- `ingestRecordsOffset(List<T> objs, JsonSerializer<T>)` - Batch auto-serialized ingestion |
| 26 | +- `getUnackedRecords()` - Returns `List<String>` of unacked JSON records |
| 27 | +- `getUnackedRecords(JsonDeserializer<T>)` - Returns parsed `List<T>` of unacked records |
| 28 | +- `getUnackedBatches()` - Returns `List<EncodedBatch>` preserving batch grouping |
| 29 | + |
| 30 | +### New Factory Methods |
| 31 | + |
| 32 | +- `ZerobusSdk.createProtoStream(tableName, descriptorProto, clientId, clientSecret)` - Create proto stream |
| 33 | +- `ZerobusSdk.createProtoStream(tableName, descriptorProto, clientId, clientSecret, options)` - With options |
| 34 | +- `ZerobusSdk.createJsonStream(tableName, clientId, clientSecret)` - Create JSON stream |
| 35 | +- `ZerobusSdk.createJsonStream(tableName, clientId, clientSecret, options)` - With options |
| 36 | +- `ZerobusSdk.recreateStream(ZerobusProtoStream)` - Recreate proto stream with unacked record re-ingestion |
| 37 | +- `ZerobusSdk.recreateStream(ZerobusJsonStream)` - Recreate JSON stream with unacked record re-ingestion |
| 38 | +- `ZerobusSdk.recreateStream(ZerobusStream)` - Recreate legacy stream (deprecated) |
| 39 | + |
| 40 | +### New Supporting Types |
| 41 | + |
| 42 | +- `BaseZerobusStream` - Abstract base class with native JNI methods |
| 43 | +- `JsonSerializer<T>` - Functional interface for object-to-JSON serialization |
| 44 | +- `JsonDeserializer<T>` - Functional interface for JSON-to-object deserialization |
| 45 | +- `EncodedBatch` - Represents a batch of encoded records for recovery |
| 46 | +- `AckCallback` - Callback interface with `onAck(long)` and `onError(long, String)` |
| 47 | + |
| 48 | +### Deprecated (Backward Compatible) |
| 49 | + |
| 50 | +**ZerobusStream<T>** - Use `ZerobusProtoStream` instead: |
| 51 | +- `ingestRecord(T record)` - Returns `CompletableFuture<Void>`, use `ingestRecordOffset()` instead |
| 52 | +- `getStreamId()` - No longer exposed by native backend, returns empty string |
| 53 | +- `getState()` - Returns `OPENED` or `CLOSED` only |
| 54 | +- `getUnackedRecords()` - **Breaking:** Returns empty iterator (records stored in native, type erasure prevents deserialization). Use `ZerobusProtoStream.getUnackedRecords(Parser<T>)` for typed access, or use `recreateStream()` which handles re-ingestion automatically using cached raw bytes. |
| 55 | + |
| 56 | +**StreamConfigurationOptions**: |
| 57 | +- `setAckCallback(Consumer<IngestRecordResponse>)` - No longer invoked by native backend. Use `setAckCallback(AckCallback)` instead |
| 58 | + |
| 59 | +### Removed |
| 60 | + |
| 61 | +- `TokenFactory` - Token management now handled by native Rust SDK |
| 62 | +- `BackgroundTask` - Background processing now handled by native Rust SDK |
| 63 | +- `ZerobusSdkStubUtils` - gRPC stub utilities no longer needed with native backend |
| 64 | + |
| 65 | +### Platform Support |
| 66 | + |
| 67 | +- Linux x86_64: Supported |
| 68 | +- Windows x86_64: Supported |
| 69 | +- **macOS: Not yet supported** |
| 70 | + |
3 | 71 | ## Release v0.1.0 |
4 | 72 |
|
5 | 73 | Initial release of the Databricks Zerobus Ingest SDK for Java. |
|
0 commit comments