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

Feat configurator.AbstractCluster: add remove_domain #526

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions src/python/blazingmq/dev/configurator/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,19 @@ def _add_domain(self, domain: "Domain") -> "Domain":

return domain

def remove_domain(self, name: str) -> None:
"""
Remove a domain from the Cluster's map and all the domain's maps.

The domain must exist in `Cluster.domains`. It can be missing from the
broker's domain maps.
"""

del self.domains[name]

for node in self.nodes.values():
node.domains.pop(name, None)


class Cluster(AbstractCluster):
def domain(self, parameters: mqbconf.Domain) -> "Domain":
Expand Down
34 changes: 34 additions & 0 deletions src/python/blazingmq/dev/it/tweaks/generated.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,34 @@ def __call__(

syslog = Syslog()

class LogDump(metaclass=TweakMetaclass):
class RecordBufferSize(metaclass=TweakMetaclass):

def __call__(self, value: int) -> Callable: ...

record_buffer_size = RecordBufferSize()

class RecordingLevel(metaclass=TweakMetaclass):

def __call__(self, value: str) -> Callable: ...

recording_level = RecordingLevel()

class TriggerLevel(metaclass=TweakMetaclass):

def __call__(self, value: str) -> Callable: ...

trigger_level = TriggerLevel()

def __call__(
self,
value: typing.Union[
blazingmq.schemas.mqbcfg.LogDumpConfig, NoneType
],
) -> Callable: ...

log_dump = LogDump()

def __call__(
self,
value: typing.Union[
Expand Down Expand Up @@ -769,6 +797,12 @@ def __call__(self, value: bool) -> Callable: ...

advertise_subscriptions = AdvertiseSubscriptions()

class RouteCommandTimeoutMs(metaclass=TweakMetaclass):

def __call__(self, value: int) -> Callable: ...

route_command_timeout_ms = RouteCommandTimeoutMs()

def __call__(
self, value: typing.Union[blazingmq.schemas.mqbcfg.AppConfig, NoneType]
) -> Callable: ...
Expand Down
52 changes: 51 additions & 1 deletion src/python/blazingmq/schemas/mqbcfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,37 @@ class Heartbeat:
)


@dataclass
class LogDumpConfig:
record_buffer_size: int = field(
default=32768,
metadata={
"name": "recordBufferSize",
"type": "Element",
"namespace": "http://bloomberg.com/schemas/mqbcfg",
"required": True,
},
)
recording_level: str = field(
default="OFF",
metadata={
"name": "recordingLevel",
"type": "Element",
"namespace": "http://bloomberg.com/schemas/mqbcfg",
"required": True,
},
)
trigger_level: str = field(
default="OFF",
metadata={
"name": "triggerLevel",
"type": "Element",
"namespace": "http://bloomberg.com/schemas/mqbcfg",
"required": True,
},
)


class MasterAssignmentAlgorithm(Enum):
"""Enumeration of the various algorithm's used for assigning a master to.

Expand Down Expand Up @@ -1157,6 +1188,15 @@ class LogController:
"required": True,
},
)
log_dump: Optional[LogDumpConfig] = field(
default=None,
metadata={
"name": "logDump",
"type": "Element",
"namespace": "http://bloomberg.com/schemas/mqbcfg",
"required": True,
},
)


@dataclass
Expand Down Expand Up @@ -1855,7 +1895,8 @@ class AppConfig:
plugins..............: configuration for the plugins
msgPropertiesSupport.: information about if/how to advertise support for v2 message properties
configureStream......: send new ConfigureStream instead of old ConfigureQueue
advertiseSubscriptions.: temporarily control use of ConfigureStream in SDK/>
advertiseSubscriptions.: temporarily control use of ConfigureStream in SDK
routeCommandTimeoutMs: maximum amount of time to wait for a routed command's response
"""

broker_instance_name: Optional[str] = field(
Expand Down Expand Up @@ -2018,6 +2059,15 @@ class AppConfig:
"required": True,
},
)
route_command_timeout_ms: int = field(
default=3000,
metadata={
"name": "routeCommandTimeoutMs",
"type": "Element",
"namespace": "http://bloomberg.com/schemas/mqbcfg",
"required": True,
},
)


@dataclass
Expand Down
Loading