Rheinland-Pfalz: WLAN-Basisausstattung an nahezu allen Schulen

heise online Newsticker - 11. Januar 2024 - 9:37

Die Versorgung mit WLAN ist in der Summe in über 90 Prozent der Unterrichtsräume verfügbar, erklärte die Bildungsministerin. Allerdings fehlen einige Daten.

Google entlässt Hunderte Mitarbeiter, Hardware-Bereich besonders betroffen

heise online Newsticker - 11. Januar 2024 - 9:02

Google entlässt einige Hundert Mitarbeiter. Besonders betroffen ist die Hardware-Abteilung.

heise-Angebot: iX-Workshop IaC: IT- und Cloud-Infrastruktur mit Terraform verwalten

heise online Newsticker - 11. Januar 2024 - 9:00

Erstellen und verwalten Sie IT- und Cloud-Infrastrukturen als Code – Grundlagen, Installation und Nutzung von Terraform. (Frühbucherrabatt bis 28.01.)

Elektromobilität: DC-Laden mit Powerblock und Dispenser

heise online Newsticker - 11. Januar 2024 - 8:21

Das DC-Laden von Elektroautos mit Powerblock und Dispenser verspricht mehr Flexibilität und sinkende Infrastrukturkosten. Wie ist das technisch gelöst?

1,7 Millionen Versuchstiere eingesetzt – Statistik der Woche

heise online Newsticker - 11. Januar 2024 - 8:00

Bereits im dritten Jahr in Folge ist die Zahl der Versuchstiere in der Wissenschaft gesunken. Welche die größten Gruppen darstellen, zeigt die Infografik.

Mathematica 14.0: Computeralgebrasystem mit 6602 Funktionen und KI-Integration

heise online Newsticker - 11. Januar 2024 - 7:35

Version 14.0 des wissenschaftlichen Programmpakets Mathematica bietet 6602 integrierte Funktionen und die Interaktion mit generativer KI durch "Chat Notebooks".

CES: Nuance Audio: Diese Brille ist auch eine Hörhilfe​

heise online Newsticker - 11. Januar 2024 - 7:30

Die Nuance Audio von EssilorLuxottica ist Seh- und Hörhilfe gleichzeitig. Lautsprecher und Mikros sind kaum sichtbar im Brillengestell integriert. ​

Donnerstag: Bitcoin-Fonds doch an US-Börsen, Nordkorea mit gebrauchtem 4G-Netz

heise online Newsticker - 11. Januar 2024 - 7:30

Erlaubnis für Bitcoin-Fonds + Nordkorea-LTE aus 2. Hand + Amazon auf Sparkurs + KI-Training verbesserungswürdig + Lücken bei Ivanti + #heiseshow zu KI auf CES

FAQ: Wir beantworten die häufigsten Fragen zu Tablets

heise online Newsticker - 11. Januar 2024 - 7:28

Tablets versprechen viel und leisten eine Menge. Doch Tablet ist nicht gleich Tablet, es gibt viele Unterschiede sowohl in der Hardware als auch der Software.

CES: Fingerring statt Uhr oder Tracker

heise online Newsticker - 11. Januar 2024 - 7:21

Unauffälliger gehts kaum: Körperdaten kann man statt mit einer smarten Uhr oder einem Fitnesstracker auch mit einem kleinen Ring am Finger erfassen.

#heiseshow: CES, Balkonkraftwerke, DSGVO-Mails

heise online Newsticker - 11. Januar 2024 - 7:16

Diesmal in der #heiseshow: Die CES präsentiert KI als Top-Trend. Zusätzlich: Verzögerungen bei Balkonkraftwerken und Datenschutzrisiken unverschlüsselter Mails.

CES: XPeng Aeroht: Flugauto für Endkunden Ende 2025 lieferbar

heise online Newsticker - 11. Januar 2024 - 7:11

Das sportliche E-Auto der chinesischen Firma XPeng Aeroht klappt auf Knopfdruck vier Rotorarme aus und soll dann bereit sein für kurze Flüge in geringer Höhe.

Amazon streicht Hunderte Stellen bei Prime Video und übernommenen MGM-Studios

heise online Newsticker - 11. Januar 2024 - 6:12

Neben den Stellenkürzungen bei Twitch setzt Amazon den Rotstift auch bei Prime Video und den MGM-Studios an. Einige hundert Mitarbeiter müssen gehen.

Jetzt geht’s los: SEC genehmigt Bitcoin-Fonds

heise online Newsticker - 11. Januar 2024 - 5:31

Die SEC beugt sich einer Gerichtsentscheidung: Drei US-Börsen dürfen ab Donnerstag Bitcoin-ETFs handeln. Der Ether-Kurs steigt.​

ImageX: Accessibility Elements, Part 5: Captions, Subtitles, Transcripts, and Audio Descriptions in Drupal

Planet Drupal - 11. Januar 2024 - 2:06

Multimedia content, such as engaging videos, insightful podcasts, and vibrant images, is meant to captivate, inform, and entertain website users. However, while creating an immersive world of multimedia experiences, it’s necessary to be mindful of the people with a wide range of impairments who need alternative ways to perceive the content. 

Studie: Bessere Arbeitsbedingungen fürs Training von KI-Modellen nötig

heise online Newsticker - 11. Januar 2024 - 1:40

Viele Click-Worker sind nötig, um Künstliche Intelligenz möglich zu machen. Laut britischen Forschern wird deren Arbeit mit mehr Geld und klaren Regeln genauer.

Zerodays bei Ivanti aktiv genutzt: Connect Secure und Policy Secure sinds nicht

heise online Newsticker - 11. Januar 2024 - 0:01

Zwei Zero-Days in Ivanti-Produkten machen es "trivial für Angreifer", Befehle auszuführen und sich im Firmennetz einzunisten. Ivanti hat bedingt gute Tipps.​

Nordkorea baut LTE-Netz aus Huawei-Teilen

heise online Newsticker - 10. Januar 2024 - 23:16

Betuchte Bewohner Pjöngjangs dürfen mit 4G ins Intranet. Der Netzausbau läuft mit gebrauchten Teilen aus China.​

PreviousNext: Real-time: Symfony Messenger Consume command and prioritised messages

Planet Drupal - 10. Januar 2024 - 21:39

The greatest advantage of Symfony Messenger is arguably the ability to send and process messages in a different thread almost immediately. This post covers the worker that powers this functionality.

by daniel.phin / 11 January 2024

This post is part 3 in a series about Symfony Messenger.

  1. Introducing Symfony Messenger integrations with Drupal
  2. Symfony Messenger’ message and message handlers, and comparison with @QueueWorker
  3. Real-time: Symfony Messenger’ Consume command and prioritised messages
  4. Automatic message scheduling and replacing hook_cron
  5. Adding real-time processing to QueueWorker plugins
  6. Making Symfony Mailer asynchronous: integration with Symfony Messenger
  7. Displaying notifications when Symfony Messenger messages are processed
  8. Future of Symfony Messenger in Drupal

The Symfony Messenger integration, including the worker, is provided by the SM project. The worker is tasked with listening for messages ready to be dispatched from an asynchronous transport, such as the Doctrine database transport. The worker then re-dispatches the message onto the bus.

Some messages may be added to a bus with no particular execution time, in which case they are serialised by the original thread. Then unserialised almost immediately by the consume command in a different thread.

Since Messenger has the concept of delaying messages until a particular date, the DelayStamp can be utilised. The consume command respects this stamp and will not redispatch a message until the time is right.

The worker is found in the sm console application, rather than Drush. When SM is installed, Composer makes the application available in your bin directory. Typically at /vendor/bin/sm

The command takes one or more transports as the argument. For example if you’re using the Doctrine transport, the command would be:

sm messenger:consume doctrine

Multiple instances of the worker may be run simultaneously to improve throughput.

The worker. Messages output to stdout for demonstration purposes.Prioritised messages

The worker allows you to prioritise the processing of messages by which transport a message was dispatched to. Transport prioritisation is achieved by adding a space separated list of transports as the command argument.

For example, given transports defined in a site-level services.yml file:

parameters: sm.transports: doctrine: dsn: 'doctrine://default?table_name=messenger_messages' highpriority: dsn: 'doctrine://default?table_name=messenger_messages_high' lowpriority: dsn: 'doctrine://default?table_name=messenger_messages_low'

In this case, the command would be sm messenger:consume highpriority doctrine lowpriority

Routing from messages to transports must also be configured appropriately. For example, you may decide Email messages are the highest priority. \Symfony\Component\Mailer\Messenger\SendEmailMessage would be mapped to highpriority:

parameters: sm.routing: Symfony\Component\Mailer\Messenger\SendEmailMessage: highpriority Drupal\my_module\LessImportantMessage: lowpriority '*': doctrine

More information on routing can be found in the previous post.

The transport a message is sent to may also be overridden on an individual message basis by utilising the Symfony\Component\Messenger\Stamp\TransportNamesStamp stamp. Though for simplicity I’d recommend sticking to standard routing.

Running the CLI application

The sm worker listens and processes messages, and is designed to run forever. A variety of built in flags are included, with the ability to quit when a memory or time limit is reached, or when a certain number of messages are processed or fail. Flags can be combined to process available messages and quit, much like drush queue:run.

Further information on how to use the worker in production can be found in the Consuming Messages (Running the Worker) documentation.

The next post covers Cron and Scheduled messages, a viable replacement to hook_cron.

Tagged Symfony, Symfony Messenger, Symfony Console, CLI

TechStage | Top 10: Die besten Mini-Taschenlampen mit Akku & USB – hell & kompakt

heise online Newsticker - 10. Januar 2024 - 21:00

Taschenlampen im Kleinstformat sind aufladbar und trotzdem strahlend hell. TechStage zeigt die besten Mini-Taschenlampen und worauf es ankommt.