Ejemplo n.º 1
0
 async def fetch(self, group_name: str, instance: str, content_type: str, *, request: HTTPRequest):
     await self.consumer_manager.fetch(
         internal_name=ConsumerManager.create_internal_name(group_name, instance),
         content_type=content_type,
         query_params=request.query,
         formats=request.accepts
     )
Ejemplo n.º 2
0
 async def seek_beginning_consumer_offsets(self, group_name: str,
                                           instance: str, content_type: str,
                                           *, request: HTTPRequest):
     await self.consumer_manager.seek_limit(
         ConsumerManager.create_internal_name(group_name, instance),
         content_type,
         request.json,
         beginning=True)
Ejemplo n.º 3
0
 async def update_consumer_subscription(self, group_name: str,
                                        instance: str, content_type: str, *,
                                        request: HTTPRequest):
     await self.consumer_manager.set_subscription(
         ConsumerManager.create_internal_name(group_name, instance),
         content_type,
         request.json,
     )
Ejemplo n.º 4
0
 async def update_consumer_offsets(self, group_name: str, instance: str, content_type: str, *, request: HTTPRequest):
     await self.consumer_manager.seek_to(
         ConsumerManager.create_internal_name(group_name, instance), content_type, request.json
     )
Ejemplo n.º 5
0
 async def get_consumer_assignment(self, group_name: str, instance: str, content_type: str):
     await self.consumer_manager.get_assignments(
         ConsumerManager.create_internal_name(group_name, instance),
         content_type,
     )
Ejemplo n.º 6
0
 async def delete_consumer_subscription(self, group_name: str, instance: str, content_type: str):
     await self.consumer_manager.delete_subscription(
         ConsumerManager.create_internal_name(group_name, instance),
         content_type,
     )
Ejemplo n.º 7
0
 async def commit_consumer_offsets(self, group_name: str, instance: str, content_type: str, *, request: HTTPRequest):
     await self.consumer_manager.commit_offsets(
         ConsumerManager.create_internal_name(group_name, instance), content_type, request.json, self.cluster_metadata()
     )