Buy ebook (Ebook) Reactive Patterns with RxJS for Angular: A practical guide to managing your Angular application's data reactively and efficiently using RxJS 7 by Lamis Chebbi ISBN 9781801811514, 1801811512 cheap price
Buy ebook (Ebook) Reactive Patterns with RxJS for Angular: A practical guide to managing your Angular application's data reactively and efficiently using RxJS 7 by Lamis Chebbi ISBN 9781801811514, 1801811512 cheap price
com
OR CLICK HERE
DOWLOAD EBOOK
(Ebook) Reactive Programming with Angular and ngrx: Learn to Harness the Power of
Reactive Programming with RxJS and ngrx Extensions by Oren Farhi (auth.) ISBN
9781484226193, 9781484226209, 1484226194, 1484226208
https://ebooknice.com/product/reactive-programming-with-angular-and-ngrx-learn-
to-harness-the-power-of-reactive-programming-with-rxjs-and-ngrx-
extensions-5880848
ebooknice.com
(Ebook) Reactive Programming with RxJS: Untangle Your Asynchronous JavaScript Code
by Sergi Mansilla ISBN 9781680501292, 1680501291
https://ebooknice.com/product/reactive-programming-with-rxjs-untangle-your-
asynchronous-javascript-code-5436056
ebooknice.com
(Ebook) Reactive Programming with RxJS 5: Untangle your asynchronous Javascript code
by Sergi Mansilla ISBN 9781680502473, 1680502476
https://ebooknice.com/product/reactive-programming-with-rxjs-5-untangle-your-
asynchronous-javascript-code-11056580
ebooknice.com
(Ebook) Essential Angular for ASP.NET Core MVC 3: A Practical Guide to Successfully
Using Both in Your Projects by Adam Freeman ISBN 9781484252840, 1484252845
https://ebooknice.com/product/essential-angular-for-asp-net-core-
mvc-3-a-practical-guide-to-successfully-using-both-in-your-projects-12113178
ebooknice.com
(Ebook) Build Reactive Websites with RxJS: Master Observables and Wrangle Events by
Randall Koutnik ISBN 9781680502954, 1680502956
https://ebooknice.com/product/build-reactive-websites-with-rxjs-master-
observables-and-wrangle-events-37324060
ebooknice.com
(Ebook) Practical Highcharts with Angular: Your Essential Guide to Creating Real-
time Dashboards by Sourabh Mishra ISBN 9781484291801, 1484291808
https://ebooknice.com/product/practical-highcharts-with-angular-your-essential-
guide-to-creating-real-time-dashboards-49162796
ebooknice.com
(Ebook) Practical Highcharts with Angular: Your Essential Guide to Creating Real-
time Dashboards, 2nd Edition by Sourabh Mishra ISBN 9781484291818, 1484291816
https://ebooknice.com/product/practical-highcharts-with-angular-your-essential-
guide-to-creating-real-time-dashboards-2nd-edition-47899344
ebooknice.com
(Ebook) Progressive Web Apps with Angular: Create Responsive, Fast and Reliable PWAs
Using Angular by Majid Hajian ISBN 9781484244470, 1484244478
https://ebooknice.com/product/progressive-web-apps-with-angular-create-
responsive-fast-and-reliable-pwas-using-angular-34622900
ebooknice.com
(Ebook) Learn With: Angular 4: Collected Essays: Angular CLI, Unit Testing,
Debugging TypeScript, and Angular Build Processes by Jeffry Houser
https://ebooknice.com/product/learn-with-angular-4-collected-essays-angular-cli-
unit-testing-debugging-typescript-and-angular-build-processes-6856786
ebooknice.com
Reactive Patterns
with RxJS
for Angular
Lamis Chebbi
BIRMINGHAM—MUMBAI
Reactive Patterns with RxJS for Angular
Copyright © 2022 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or
transmitted in any form or by any means, without the prior written permission of the publisher,
except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the
information presented. However, the information contained in this book is sold without warranty,
either express or implied. Neither the author, nor Packt Publishing or its dealers and distributors,
will be held liable for any damages caused or alleged to have been caused directly or indirectly by
this book.
Packt Publishing has endeavored to provide trademark information about all of the companies
and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing
cannot guarantee the accuracy of this information.
Associate Group Product Manager: Pavan Ramchandani
Publishing Product Manager: Ashitosh Gupta
Senior Editor: Mark Dsouza
Content Development Editor: Divya Vijayan
Technical Editor: Shubham Sharma
Copy Editor: Safis Editing
Project Coordinator: Ajesh Devavaram
Proofreader: Safis Editing
Indexer: Rekha Nair
Production Designer: Alishon Mendonca
Marketing Coordinator: Elizabeth Varghese
ISBN 978-1-80181-151-4
www.packt.com
To my father, who taught me diligence, perseverance, and work ethic. Thank
you for always being there to support me and lift me up.
To my mother, who taught me selflessness and doing things with love.
Thank you for your enduring encouragement during the writing of this
book.
Preface
Part 1 – Introduction
1
The Power of the Reactive Paradigm
Technical requirements 4 The HTTP client module 7
Exploring the pillars of reactive The router module 8
programming 4 Reactive forms 13
Data streams 4 The event emitter 14
Observer patterns 5 The async pipe 15
2
RxJS 7 – The Major Features
Technical requirements 20 The firstValueFrom() method 25
Exploring the bundle size The lastValueFrom() method 26
improvements 20 Empty errors 26
3
A Walkthrough of the Application
Technical requirements 32 View five – the modify recipe interface 36
Our app's user stories 32 View six – the recipe details interface 37
Summary59
5
Error Handling
Technical requirements 62 Exploring error handling
Understanding the anatomy of patterns and strategies 63
an Observable 62 Handling error operators 64
Table of Contents ix
6
Combining Streams
Technical requirements 80 Exploring the declarative
Defining the requirement 80 pattern for filtering data 85
Exploring the imperative The combineLatest operator 86
pattern for filtering data 81 The declarative pattern pillars 87
Emitting a value when an action occurs 90
A look at the filter component 81
A look at the recipes list component 82 Summary94
7
Transforming Streams
Technical requirements 96 Learning about other useful
Defining the requirement 96 higher-order mapping
operators107
Exploring the imperative
pattern for autosave 97 The mergeMap operator 107
The switchMap operator 108
Exploring the reactive pattern
The exhaustMap operator 109
for autosave 100
Higher-order observables 101 Summary110
Higher-order mapping operators 101
The concatMap operator 102
9
Caching Streams
Technical requirements 126 Exploring the RxJS 7
Defining the requirement 126 recommended pattern to
cache streams 133
Learning about using
the reactive pattern to Highlighting the use cases of
cache streams 127 caching streams 134
Summary135
10
Sharing Data between Components
Technical requirements 138 Step two – updating the last-selected
recipe140
Defining the requirement 138
Step three – consuming the
Exploring the reactive pattern last-selected recipe 142
to share data 139
Step one – creating a shared service 139 Highlighting other ways for
sharing data 144
Summary145
11
Bulk Operations
Technical requirements 147 The pattern in action 151
Defining the requirement 148 Learning about the reactive
Learning about the reactive pattern for tracking progress 156
pattern for bulk operations 149 Summary157
The forkJoin operator 150
Table of Contents xi
12
Processing Real-Time Updates
Technical requirements 160 Connection management 164
Defining the requirement 160 Putting the pattern into action 166
Index
Other Books You May Enjoy
Preface
Switching to a reactive mindset is one of the biggest challenges when you start learning
Reactive programming using RxJS. I believe that the reactive mindset is gradually
achieved by learning reactive patterns and comparing the reactive way with the imperative
one to distinguish the difference and the benefits.
That's why I wrote this book, which gathers a set of reactive patterns applied in an
Angular application. Learning reactive patterns helps with managing your application's
data efficiently, writing clean and maintainable code, reacting to user changes faster, and
consequently, enhancing the user experience.
So, all that you have to do is get started!
Conventions used
There are a number of text conventions used throughout this book.
Code in text: Indicates code words in text, database table names, folder names,
filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles.
Here is an example: "In the try block, you place your risky statements, and inside catch,
you handle the possible exceptions."
A block of code is set as follows:
behaviourSubject$.subscribe({
next: (message) => console.log(message),
error: (error) => console.log(error),
complete: () => console.log('Stream Completed'),
});
When we wish to draw your attention to a particular part of a code block, the relevant
lines or items are set in bold:
behaviourSubject$.subscribe({
next: (message) => console.log(message),
error: (error) => console.log(error),
complete: () => console.log('Stream Completed'),
});
xvi Preface
$ mkdir css
$ cd css
Bold: Indicates a new term, an important word, or words that you see onscreen. For
instance, words in menus or dialog boxes appear in bold. Here is an example: "Select
System info from the Administration panel."
Get in touch
Feedback from our readers is always welcome.
General feedback: If you have questions about any aspect of this book, email us at
[email protected] and mention the book title in the subject of your message.
Errata: Although we have taken every care to ensure the accuracy of our content, mistakes
do happen. If you have found a mistake in this book, we would be grateful if you would
report this to us. Please visit www.packtpub.com/support/errata and fill in the
form.
Piracy: If you come across any illegal copies of our works in any form on the internet,
we would be grateful if you would provide us with the location address or website name.
Please contact us at [email protected] with a link to the material.
If you are interested in becoming an author: If there is a topic that you have expertise in
and you are interested in either writing or contributing to a book, please visit authors.
packtpub.com.
Preface xvii
In this section, you will understand the importance of using the reactive paradigm in
an Angular application, as well as the new features of RxJS 7. In the third chapter, we
will introduce the application that we are going to progressively build as we go through
the book.
This part comprises the following chapters:
Technical requirements
This chapter does not require an environment setup or installation steps. All the code
snippets here are just examples to illustrate the concepts. This book assumes that you have
a basic understanding of Angular and RxJS.
Data streams
Data streams are the spine of reactive programming. Everything that might change or
happen over time (you don't know when exactly) is represented as a stream, such as data,
events, notifications, and messages. Reactive programming is about reacting to changes as
soon as they are emitted!
An excellent example of data streams is UI events. Let's suppose that we have an HTML
button, and we want to execute an action whenever a user clicks on it. Here, we can think
of the click event as a stream:
//HTML code
<button id='save'>Save</button>
//TS code
const saveElement = document.getElementById('save');
saveElement.addEventListener('click', processClick);
Exploring the pillars of reactive programming 5
function processClick(event) {
console.log('Hi');
}
As implemented in the preceding code snippet, in order to react to this click event, we
register an EventListener event. Then, every time a click occurs, the processClick
method is called to execute a side effect. In our case, we are just logging Hi in the console.
As you might have gathered, to be able to react when something happens and execute
a side effect, you should listen to the streams to become notified. We can say listen or
observe to get closer to the reactive terminology. And this leads us to the observer design
pattern, which is at the heart of reactive programming.
Observer patterns
The observer pattern is based on two main roles: a publisher and a subscriber.
A publisher maintains a list of subscribers and notifies them or propagates a change every
time there is an update. On the other hand, a subscriber performs an update or executes a
side effect every time they receive a notification from the publisher:
This leads us to the building blocks of RxJS. They include the following:
• Observables: These are a representation of the data streams that notify the
observers of any change.
• Observers: These are the consumers of the data streams emitted by observables.
RxJS combines the observer pattern with the iterator pattern and functional programming
to process and handle asynchronous events.
This was a reminder of the fundamentals of reactive programming. Remember, it is
crucial to understand when to put a reactive implementation in place and when to
avoid it.
In general, whenever you have to handle asynchronous tasks in your Angular application,
always think of RxJS. The main advantages of RxJS over other asynchronous APIs are
listed as follows:
• RxJS makes dealing with event-based programs, asynchronous data calls, and
callbacks an easy task.
• Observables guarantee consistency. They emit multiple values over time so that you
can consume continuous data streams.
• Observables are lazy; they are not executed until you subscribe to them. This helps
with writing declarative code that is clean, efficient, and easy to understand and
maintain.
• Observables can be canceled, completed, and retrieved at any moment. This makes
a lot of sense in many real-world scenarios.
• RxJS provides many operators with a functional style to manipulate collections and
optimize side effects.
• Observables push errors to the subscribers and provide a clean way to handle errors.
• RxJS allows you to write clean and efficient code to handle asynchronous data in
your application.
Now that we have given some insight into the reactive programming pillars and detailed
the major advantages of RxJS, let's shed some light on the relationship between Angular
and RxJS.
Using RxJS in Angular and its advantages 7
Note
We recommend taking a quick look at https://angular.io/docs.
Here, you can find further details about the features mentioned earlier.
@Injectable()
export class RecipesService {
constructor(private http: HttpClient) { }
getRecipes(): Observable<Recipe[]> {
return this.http.get<Recipe[]>(`${BASE_PATH}/recipes/search/
8 The Power of the Reactive Paradigm
all`);
}
The following is the content of the environment.ts file where we define the
basePath property of our backend:
• Observables are cancellable, so you can cancel the HTTP request whenever you
want by calling the unsubscribe method.
• Also, you can retry HTTP requests when an error occurs or an exception is thrown.
• The server's response cannot be mutated by observables, although this can be the
case when chaining then() to promises.
Router events
The router exposes events as observables. The router events allow you to intercept the
navigation life cycle. The following list shows the sequence of router events:
• NavigationStart
• RouteConfigLoadStart
• RouteConfigLoadEnd
Using RxJS in Angular and its advantages 9
• RoutesRecognized
• GuardsCheckStart
• ChildActivationStart
• ActivationStart
• GuardsCheckEnd
• ResolveStart
• ResolveEnd
• ActivationEnd
• ChildActivationEnd
• NavigationEnd
• NavigationCancel
• NavigationError
• Scroll
Note
We recommend that you take a quick look at https://angular.io/
api/router/Event. Here, you can find further details about the events
and their order.
To intercept all the events that the router goes through, first, you should inject the
Router service, which provides navigation and URL manipulation capabilities. Then,
subscribe to the events observable available in the Router object, and filter the events
of the RouterEvent type using the rxjs filter operator.
This is an example of an Angular service that injects the Router object in the
constructor, subscribes to the router events, and just traces the event ID and path in the
console. However, note that you can also introduce pretty much any specific behavior:
You can filter any specific event by putting the target type. The following code example
only filters the NavigationStart event and traces the event ID and path inside the
console. However, you can also introduce pretty much any specific behavior:
@Injectable()
export class CustomRouteService {
constructor(public router: Router) {
this.router.events.pipe(
filter(event => event instanceof NavigationStart)
).subscribe((event: NavigationStart) => {
console.log(`The current event is : ${event.id} |
event.url`);
});
}
}
The majority of Angular applications have a routing mechanism. The router events change
frequently over time, and it makes sense to listen to changes to execute the side effects.
That's why observables are a flexible way in which to handle those streams.
Exploring the Variety of Random
Documents with Different Content
Eleinte zöld mezőn jártam, a hol fehér tojásokból pici libácskák,
kacsák ugrottak ki és mohón enni kezdték a zöld füvet.
A felhők nagyon fehérek voltak és egészen közel ereszkedtek a
fákhoz, a melyek lilásszirü virágok terhe alatt reszkettek.
Mentem, mendegéltem a mezőn.
A libuskák száma mindig több lett, a felhők mind közelebb jöttek,
– és én nagyon könnyünek, fiatalnak éreztem magam.
Még daloltam is álmomban egy régi dalt, a melyhez, sajnos,
hiányzott a hárfakiséret.
IX. FEJEZET.
A kisértet megjelen.
A ki Podolinban azelőtt ismerte a Riminszky-házat, ugyancsak
elbámulhatott, ha utja véletlenül rövid időn belül arra vitte és az
ódon háznak nyomát kereste.
Mintha mindenestül elnyelte volna a föld a vén portát, a hol
hajdanában a „vajdák“ laktak, ivással és egyéb nemes időtöltéssel
várakozván az időre, a mig vagy itt e földön, vagy a másik világon
visszanyerik vajdai méltóságukat. Mert a vajdaság bizonyos volt. Az
egyik Riminszky – valamikor – sok pénzt költött arra, hogy valami
lázadás-félét csináljon odaát Lengyelországban. A lázadást vérbe
fojtották, némely békétlenkedőket fölakasztottak… Riminszky
állitólag igy szólott volna akkor:
– Nem baj, barátaim. A másvilágon folytatjuk a háborut. Odaát
talán győzedelmeskedik az igazság.
Megnyugodtak-e ebben azok, a kik nyakukban hurokkal lépték át
a másvilági ösvényt, – nem tudatik. A legendák rendesen
elhanyagolják az efféle részlet-dolgokat.
Tehát a vajdák régi tanyáját elnyelte a föld és helyébe egy
mosolygó, vidám házikót épitettek szorgalmas kezek. Azaz talán a
falak megmaradtak, csak a régi szinüket váltották föl mással. Azelőtt
komor zöldek voltak, most rózsaszinüek lettek. A tetőről leverték a
mohos zsindelyt és helyébe tarka, sokszinü zsindelyt raktak. Az uj
kapun rézkilincs ragyogott, a melyet egy görbelábu öreg ember
É
sürün fényesitett. És az ablakokból a zordon vasrácsok helyett
vidámságot jelentő világos függönyök nevettek ki.
A mig az ódon ház igy megifjodott, Riminszky ur se maradt
tétlenül.
Elutazott Podolinból és mikor visszajött, a szomszédjai is alig
ismerték meg. A haja megfeketedett, a bajusza gácsérformáju lett és
az arca piros, mint a rózsa.
– Ördöngős Riminszkyje – mondogatták a podoliniak. – Néhány
esztendőt eltett annak idején az ifjuságából, hogy elővehesse, ha
szüksége lesz rá.
Hová tette Riminszky az ifju esztendőket és honnan vette olyan
hirtelen elő, arra talán a naiv podoliniakon kivül mindenki tudott
volna felelni. Valamely ügyes borbély officinájából vette elő a
megtakaritott ifjuságot.
Midőn Ancsurka látogatására ment Lőcsére, a hol egy egész
házat bérelt ki a leánynak és öreg nénikéjének, a honnan majd
illendő módon elhozhassa feleségének, négy fehér lovat fogatott a
kocsijába és a bakra zsinóros, kardos huszár ült.
– A püspök se járhat másképpen, pedig a püspöknek talán még
Riminszkynél is több báránya van – mondták a podoliniak.
Mire Fintor uram, a sánta suszter nyomban megfelelt:
– A püspöknek lehet több báránya, de nem mindegyik báránynak
van gyapja.
A mi bizony igaz lehet, tekintve a szegény szepesi egyházmegyét.
Riminszky szakitott az európai viselettel. Szárnyas kabátban,
kürtőkalapban, lakktopánkában mindenkit láthat Ancsurka. De ugyan
van-e Lőcsén olyan valaki, a ki zöld szattyáncsizmát hord a lábán és
minden lépésénél finoman muzsikál az ezüstsarkantyu? De még zöld
mentét, aranynyal gazdagon kihányva, kócsagtollas föveget se hord
minden ember.
A mikor üveges hintóján végigrobogott a kis falukon, a tótok
lekapták a kalapjukat. Azt hitték, hogy maga a király jár közöttük,
vagy legalább is annak a helytartója.
A kik ismerősebbek voltak a dolgokkal, szájukkal csettintve
magyarázták:
– Nem született még olyan tót leány a világon, mint Prihoda
Anna. A Szüz Mária vigyázott reá a bölcsőjében, az vezette a kezénél
fogva későbben is. Azért nem volt szüksége Prihoda Annának az
édesanyjára. Mária azt mondta neki: „Eregy pihenni te szegény
tótasszony, eleget dolgoztál, kapáltál már; majd én vigyázok az
árvádra.“ És a kire Mária vigyáz, Riminszkyhez adja feleségül.
Mások nem ebből a szempontból fogták fel a dolgot.
– Bolond ez a Riminszky, az Isten elvette az eszét. Minek neki
Prihoda Anna? Egy egész vármegye minden szép leánya a felesége
lehetett volna, ő pedig kiválaszt magának egyet. Majd megunja,
majd eldobja… A legszebb bocskorból is rongy lesz valamikor.
Hogyan vesz akkor Riminszky uj bocskort?
De hát ezek a beszédek nem jutottak a Riminszky fülébe. Járta
üveges hintóján Lőcse és Podolin között az országutat. A mezőkön
mindenütt sárga virág nyilott, a réteken sárgaszoknyás tót leányok
dolgoztak. Össze lehetett téveszteni a tót leányokat a virágokkal.
A lőcseiek is nagyon büszkék voltak, hogy olyan igen nagy ur
éppen az ő városukat választja ki, hogy onnan asszonyt vigyen.
Hiába, jó izlése van annak a Riminszkynek. Tudja, hogy a lőcsei
leányok mind szépek, dolgosak, erkölcsösek. Hogyha a három
tulajdonság közül csak egyik is ráragad a kis menyasszonyra, – már
pedig valamelyik csak ráragad, hisz az odavaló levegőt szivja, meg a
vizet issza – Riminszky akkor is boldog ember lehet.
Az üveges batár soha sem jött üresen. A hintó mögé terjedelmes
láda volt csatolva és a ládában mindig akadt valami ajándék
Ancsurkának meg Marczinkánénak. A legszebb ruhákat Ancsurka
viselte Lőcsén, a legdrágább kalapjai neki voltak, selyem, bársony,
brokát annyi hevert a szobájában, hogy akár boltot rendezhetett
volna be belőle. De több esze volt, hogy boltot rendezett be volna,
egész nap azon töprengett Marczinkánéval, hogy mit varrjanak ők
abból a sok drága kelméből? Később erről is gondoskodott Riminszky
ur – mintha csak az Ancsurka gondolatát találta volna ki – három
varrónőt beállitott a lőcsei házba, azok aztán reggeltől estig egyebet
sem tettek, mint varrták, varrták a sok drága kelmét. A varrónők
nem fáradtak el, de a kelme sem fogyott el soha. Még az öreg
Marczinkánénak is olyan ruhát varrtak a varrónők, hogy a mikor a jó
asszony először felvette, meg se mert benne mozdulni. Egész nap a
karosszékben ült – ülhetett, mert egyéb dolga nem volt – és
nagyokat sóhajtott:
– Istenkém, Istenkém, ki hitte volna? Az egyik Riminszky
bocskorokat vett, a másik selyemruhákat. Hát olyan szép vagyok én?
Hittem volna valaha, hogy olyan szép vagyok?
Riminszky – nagyon megszelidült ez a haragos, komor férfiu –
megsimogatta a vénasszonyka kezét:
– Nagyon szép vagy, nénike! Meglátod, még férjhez is adlak.
Csak várj sorodra, egyszer majd férjhez adlak.
Marczinkáné nevetett:
– Lehet, lehetséges… Hiszen ha Toporcon ebben a selyemben,
bársonyban meglátnának, mindjárt akadna három kérőm is.
Majd elgondolkozva tette hozzá:
– De lehet, hogy négy is akadna…
Ancsurka megsimogatta a néni arcát:
– Talán öt kérőd is akadna nénike. De azért már ne menj férjhez.
Riminszky ur a diványon ülve, igen nagyokat nevetett ezeken a
bolondságokon. Szivből, igazán nevetett, mintha csiklandozta volna
az Ancsurka hangja.
Történt, hogy Riminszky Lőcséről jövet, késő éjszaka érkezett a
podolini határba. A négy fehér ló vigan szántotta az országutat; a
huszár a bakon, Riminszky a hintóban csendesen bóbiskolt.
A mikor a város széléhez értek, a hol hajdanában kapu volt, most
pedig rombadőlt bástyák álltak nagy szomoruságban, a lovak
hirtelen meghőköltek, a vén kocsis káromkodva rántotta vissza a
gyeplőt.
Riminszky megdörzsölte a szemét.
A mezőn – a Poprád irányába – fehér árnyék imbolygott tova.
– Mi az? – kiáltott nyugtalankodva Riminszky.
A kocsis – régifajt ember volt – megsodorta a bajuszát és
kedvetlenül dörmögött:
– Valami lelket láttak a lovak.
Az ostorával a mezők felé mutatott:
– Ahun megy ni. A füzesek alatt.
Ekkor Riminszky is látta a fehér, imbolygó árnyékot a folyó felé
haladni, mintha hosszu köntösü szellemalak lett volna – a köntös
ködből és felhőből – és öleseket lépett.
– A macskába! – dörmögött Riminszky. – Hát ez megint miféle
babonaság?
Nem igen volt ideje feleletet adni a kérdésre. A négy ló
tovaragadta és csakhamar hazáig vitte.
A rózsaszinü vidám házikó előtt félig öltözötten, nagy felidulás
közepette állott az öreg Mik és a városi bakteroknak magyarázott
éppen valamit, a kik lámpásaikat lóbálták.
Riminszky kiugrott a hintóból.
– Kezét csókolom, nemes nagy uram, – kiáltott az öreg Mik
lelkendezve. – Csak egy perccel előbb kellett volna jönni…
Riminszkynek megborzongott a háta.
– Nos? – kérdezte tétovázva.
– Alig egy perccel előbb, – folytatta az öreg szolga, – a kapun
bejött valaki, bár a lakat és a zár érintetlen volt. Bejárta a házat,
végigment a szobákon. Csupán arra ébredtem fel, hogy lépések
kopognak az emeleten, a mely lépések senkié. Kapom a lámpást és
egy vasrudat, – no mert zsiványokra gyanakodtam, – s a lépcsőn
megtántorodtam, mert egy fehérruhás nőszemély a mellembe
vágott. Kiáltásomra ide gyültek ezek a jó emberek.
Klein Márton éjjeli őr megerősítette az öreg Mik szavait.
– Éppen a piacon álldogáltunk, az óra egyet ütött, a kapu
csendesen felnyilt és fehér árnyék suhant ki a házból. Társammal,
Gavra Pállal, az árnyék után siettünk, de miután lépése nem
kopogott a kövezeten, jobbnak véltük visszamaradni.
Riminszky – nem igen volt valami félős ember – nyugtalanul
nézett körül:
– Részegek vagytok, emberek? – kérdezte, de csupán a maga
megnyugtatására.
Az öreg Mik némán csóválta a fejét, a mig Klein Pál éjjeli őr
butykosa nyakát megcsavarva, azt a föld felé forditotta.
– Száraz, uram, mint a „Jánosik kutja“!
– Mert benned van, huncut, – szólt Riminszky.
Az éjjeli őr tisztelgett alabárdjával:
– Bennem sincs, jó uram. Szagold meg, légy szives.
Kinyitotta a száját, Riminszky odadugta az orrát. Majd
megcsóválta a fejét:
– Hm, – dünnyögte, – ugy vélem, még ma nem ittál pálinkát.
Riminszky fölment a szobájába. A sötétes folyosón fázósan nézett
körül.
– Vajjon mit akart itt? – dünnyögte magában.
Alig hogy elaludt, nyomban felköltötte az öreg Mik.
Lovas ember hozott sürgős levelet Riminszkynek. Riminszky
felnyitotta a levelet, aztán hátrahőkölt. Megdörzsölte a szemét és
ujra a levélbe nézett.
Azt a levelet Komárominé, a nizsderi „várnagy“ irta. Röviden
tudósitotta benne Riminszkyt, hogy a nizsderi várur meghalt. Ha a
temetésén ott akar lenni, akkor jöjjön nyomban.
– Tehát ő volt a kisértet! – kiáltotta Riminszky. – Még ki sem hült,
már elindult kóborló utjára!
Nyomban felöltözött és elindult Nizsderre.
Bezzeg máskor vidáman, jókedvüen szokta megtenni ezt az utat,
most a hideg lelte egész uton. Az üveges hintó vitte a kis tót faluba
és a lakosok lekapták a kalapjukat a megye legelső földesurasága
előtt.
A lipovnicai kolostornak valamennyi harangja szólott, a mikor
Riminszky éppen elhaladt a kolostor előtt.
– Ez már a nizsderi halottnak szól, – gondolta magában
Riminszky.
Megállitotta a kocsit és a hintóhoz intette a kapuban gunnyasztó
vén frátert.
– Nos, mit mondanak? Mi baja volt a halottnak? – kérdezte.
A kapusfráter vállat vont.
– Még eddig a kivel beszéltem, mind azt mondta, hogy beteg
sem volt és a koporsót máris elhozatta Krakkóból. Nagy
márványkoporsót hozatott, a melyet tizenkét ló vonszolt ide. A
képfaragók három hétig kalapáltak a várudvarban, bevésték a
szokásos betüket, figurákat, képeket. Ő meg hallgatta azt a
kalapálást. Mikor mindennel elkészültek, elküldött a várból
mindenkit, csupán csak Pétert, a vak zenészt türte meg maga
mellett.
Péter három nap mulva megkonditotta a lélekharangot a
toronyban, ekkor már mindnyájan tudtuk, hogy halott van a nizsderi
várban.
Riminszkynek valami viz nedvesitette meg a szemét.
– Szegény! Tehát önkezével vetett véget életének?
A fráter a vállát vonogatta:
– Ki tudná azt bizonyosan? Hiszen ismered uram a dörgést: nem
igen eresztenek senkit sem a várba. Rocskay Teofil doktor járt ott
csupán. Az a hóbortos se mondott többet:
– Örökké nem élhet senki.
Hát már most hogyan lehet ebből kiokosodni?
– Hát te mit gondolsz magadban, tisztelendő testvér?
– Én azt gondolom, hogy délután nagy temetésünk lesz, persze a
kolostor rendezi a temetést és utána nagy tort rendelt a halott.
Riminszky a várnak kanyarodott. A vár épen olyannak látszott a
völgyből, mint máskor. A bástyákon sohasem mutatkozott senki
akkoriban sem. A nagy kapu kinyilott és Riminszky hintaja döngve
gördült be az udvarra.
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade
Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.
ebooknice.com