All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.reaktivity.specification.kafka.fetch.v5.message.header.null.client.rpt Maven / Gradle / Ivy

There is a newer version: 0.172
Show newest version
#
# Copyright 2016-2020 The Reaktivity Project
#
# The Reaktivity Project licenses this file to you under the Apache License,
# version 2.0 (the "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at:
#
#   http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#

property networkConnect "nukleus://streams/kafka#0"
property networkConnectWindow 8192

property newRequestId ${kafka:newRequestId()}
property fetchWaitMax 500
property fetchBytesMax 65535
property partitionBytesMax 8192

connect await ROUTED_SERVER
        ${networkConnect}
  option nukleus:window ${networkConnectWindow}
  option nukleus:transmission "duplex"
  option nukleus:byteorder "network"

connected

write 21                                # size
      3s                                # metadata
      5s                                # v5
      ${newRequestId}
      -1s                               # no client id
      1                                 # topics
        4s "test"                       #   "test" topic
      [0x00]                            # allow_auto_topic_creation

read 97                                 # size
     ${newRequestId}
     [0..4]
     1                                  # brokers
       0xb1                                 # broker id
       19s "broker1.example.com"            # host name
       9092                                 # port
       -1s                                  # no rack
     9s "cluster 1"                     # cluster id
     1                                  # controller id
     1                                  # topics
       0s                                 # no error
       4s "test"                          #   "test" topic
       [0x00]                             # not internal
       1                                  # partitions
         0s                                 # no error
         0                                  # partition
         0xb1                               # leader
         0                                  # no replicas
         -1                                 # no in-sync replicas
         0                                  # offline replicas

read notify ROUTED_BROKER_SERVER

connect await ROUTED_BROKER_SERVER
        ${networkConnect}
  option nukleus:window ${networkConnectWindow}
  option nukleus:transmission "duplex"
  option nukleus:byteorder "network"

write nukleus:begin.ext ${proxy:beginEx()
                               .typeId(nukleus:id("proxy"))
                               .addressInet()
                                 .protocol("stream")
                                 .source("0.0.0.0")
                                 .destination("broker1.example.com")
                                 .sourcePort(0)
                                 .destinationPort(9092)
                                 .build()
                               .build()}

connected

write 65                                # size
      1s                                # fetch
      5s                                # v5
      ${newRequestId}
      -1s
      -1
      ${fetchWaitMax}
      1
      ${fetchBytesMax}
      [0x00]
      1
      4s "test"
      1
      0                                 # partition
      21L                               # offset
      -1L
      ${partitionBytesMax}

read 149
     ${newRequestId}
     [0..4]
     1
     4s "test"
     1                                  # partitions
     0                                  # partition
     0s                                 # no error
     22L                                # high water mark
     -1L                                # last stable offset
     -1L                                # no log start offset
     -1                                 # no aborted transaction count
     89                                 # record set size
     21L                                # first offset
     77                                 # length
     0x00
     [0x02]
     0x4e8723aa
     0s
     0                                  # last offset delta
     (long:timestamp)                   # first timestamp
     ${timestamp}                       # last timestamp
     -1L
     -1s
     -1
     1                                  # records
     ${kafka:varint(27)}
     [0x00]
     ${kafka:varint(0)}
     ${kafka:varint(0)}
     ${kafka:varint(-1)}
     ${kafka:varint(12)}
     "Hello, world"
     ${kafka:varint(1)}                 # headers
       ${kafka:varint(7)}
       "header1"                          # "header1" key
       ${kafka:varint(-1)}                # null value




© 2015 - 2024 Weber Informatics LLC | Privacy Policy